2 register.hh -- part of LilyPond
4 (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
13 #include "staff-elem-info.hh"
16 a struct which processes requests, and creates the #Staff_elem#s.
17 It may use derived classes. Hungarian postfix: register
19 class Request_register
{
20 friend class Register_group_register
;
22 You cannot copy a Request_register
24 Request_register(const Request_register
&){}
28 virtual Paper_def
* paper() const;
31 try to fit the request in this register
34 false: not noted, not taken.
36 true: request swallowed. Don't try to put the request elsewhere.
39 Default: always return false
41 virtual bool try_request(Request
*req_l
);
43 /// make items/spanners with the requests you got
44 virtual void process_requests(){}
46 /** typeset any items/spanners. Default: do nothing
48 virtual void pre_move_processing(){}
49 /** reset any appropriate data. Default: do nothing
51 virtual void post_move_processing(){}
54 Is this request eligible to be processed? Default: return false.
56 virtual bool acceptable_request_b(Request
*) const;
59 typeset a "command" item. Default: pass on to daddy.
60 If the column is not breakable, #pre_p# and #post_p# are junked
62 virtual void typeset_breakable_item(Item
* pre_p
,
63 Item
* nobreak_p
, Item
* post_p
);
65 Invoke walker method to typeset element. Default: pass on to daddy.
67 virtual void typeset_element(Staff_elem
*elem_p
);
70 take note of item/spanner
71 put item in spanner. Adjust local key; etc.
73 Default: ignore the info
75 virtual void acknowledge_element(Staff_elem_info
) {}
77 Announce element. Default: pass on to daddy. Utility
79 virtual void announce_element(Staff_elem_info
);
81 Set features of the register(s). Default: ignore features.
83 virtual void set_feature(Features
){}
85 Does this equal or contain a certain register?
87 virtual bool contains_b(Request_register
*reg_l
);
89 Get information on the staff. Default: ask daddy.
91 virtual Staff_info
get_staff_info();
93 virtual void do_print()const;
95 /** Every Request_register (except for the 'top' which is directly
96 inside the Staff_walker, is a element of a group. */
97 Register_group_register
* daddy_reg_l_
;
100 virtual ~Request_register(){}
101 NAME_MEMBERS(Request_register
);
106 #endif // REGISTER_HH