> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of E. Gladyshev > Sent: Monday, July 28, 2003 1:00 PM > To: Boost mailing list > Subject: RE: [boost] GUI/GDI template library > > > > boost::function<void,CRect> positioner = > > row( edit_1, combo_1, column( edit_2, > > some_static_text)); > > Interesing idea about a separate positioner object. > What are the row/column do exactly?
Take a simple case first: row( an_edit_control, a_static_text_control); This creates an object that positions the edit control to the left of the static text control. It gives the static text controls the exact amount of space it needs to display its static (unchanging) text (it recalculates this every time in case the text does change). The resulting object also knows how big the combination needs to be. It knows that due to the edit control that the objects can expand limitlessly horizontally. It knows what the minimum amount of horizontal space is required to display both items (the edit will have some minimum size). It knows how to calculate the maximum and minimum required vertical size too. column (control_1, control_2); works similarly. The results of column() and row() can be passed to each other. I don't know what the formal definition of an expression template system is, but this is similar. I don't overload any operators, but the result of concocted calls to row() and column() (and others, like grid()) contain all of the types of all of the sub objects they were passed. I've got several other functions that help implement various GUI idioms I've needed. Another neet one is group: group("Group Label", column( edit(), row("hello", combo()))); The first parameter to group() is the text that will be the groups label. The second parameter is any contoction(?) of controls. The object returned by group() knows how much space is required to position the 'group box' and the controls it contains. Does this make sense? I'm sorry if I am not explaining this very well. I'll see if I can dig up the documentation I wrote for our programmers here. Brock Peabody Software Development Manager NPC International _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost