]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/page-spacing-result.hh
Merge commit 'origin' into systems-per-page
[lilypond.git] / lily / include / page-spacing-result.hh
1 /* 
2   page-spacing-result.hh -- declare  Page_spacing_result
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2007--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
7   
8 */
9
10 #ifndef PAGE_SPACING_RESULT_HH
11 #define PAGE_SPACING_RESULT_HH
12
13 #include "std-vector.hh"
14 #include "lily-proto.hh"
15
16 // This enum is a bitfield: since we use one System_count_status
17 // to represent the system count of several pages simultaneously,
18 // it could be that one page has too many systems while another
19 // has too few.
20 typedef enum {
21   SYSTEM_COUNT_OK = 0,
22   SYSTEM_COUNT_TOO_MANY = 1,
23   SYSTEM_COUNT_TOO_FEW = 2
24 } System_count_status;
25
26 struct Page_spacing_result {
27   vector<vsize> systems_per_page_;
28   vector<Real> force_;
29   Real penalty_;
30   Real demerits_;
31   int system_count_status_;
32
33   Real average_force () const;
34   vsize page_count () const;
35   vsize system_count () const;
36   void print () const;  
37   Page_spacing_result ();
38 };
39
40 #endif /* PAGE_SPACING_RESULT_HH */