The code to handle calculating message dialog height is at net/dispatch.c line 739. It starts with the text width and height, as reported by sizetext(). Then, it uses the very scientific method of "Accounting for doodads", in which it adds the toolbar height from the theme, plus an extra width/height parameter from the theme. Definitely in need of an overhaul, huh. I'd like to move the code to create the message dialog to a seperate 'standard dialogs' file. Something like appmgr/stddialog.c. Standard dialogs pose an interesting problem for PicoGUI, because it would be nice for as much as possible to be implemented in the server (for speed and standardization) but the dialog's behavior needs to be implemented in the client. For example, a file open dialog needs to display files in the client's filesystem. Maybe the server creates the dialog and all widgets, then passes on the handles of relevant widgets to the client for the event loop. Maybe it makes sense to do it all in the client? Perhaps this should be generalized further. Maybe the server needs a generic method for converting a description of a dialog into a 'live' dialog, then correlating widget handles with some sort of identifier so the client can accept events from the widgets and set properties. The description of a dialog could be very simple: just a list of widget types,names,relationships,and parameters. In fact, it could just use raw PicoGUI requests to call pgNewWidget and pgSetWidget. The dialog (maybe this could be used for entire apps too?) description would simply be a block of binary data containing the relevent pgNewWidget and pgSetWidget requests, and a table correlating widget names with the address of the pgNewWidget command in the data block. This binary data block could be created with a simple compiler, or maybe even a graphical tool. Well, either way, the dialogs need a new way to size themselves. I'd like to implement a standard function for all widgets that would return the preferred size, in pixels. If this function was recursive when necessary, the server could simply 'ask' the popup widget what size it needs. This would also simplify the resizing code already in place for labels, buttons, and bitmaps. On Mon, 04 June 2001, Philippe Ney wrote: > > Hi Micah, > > How is managed the dialog box size and particularly the height? > When I increase (through the theme) the height of buttons, the text in dialog > boxes is overrided by the bottom toolbar that contains the buttons > (yes,no,ok,...). > > I think the height depends only of the number of text lines and take in account > a fixed height for the bottom toolbar, is this right? > > Is there a simple way to include variable height (given through theme) for the > calcul of the dialog box height? > > -philippe > > _______________________________________________ > Pgui-devel mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/pgui-devel -- To the systems programmer, users and applications serve only to provide a test load. _______________________________________________ Pgui-devel mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/pgui-devel
