Hi guys,
Okay, let see if I can make this clear. I am designing and developing a GUI interface for users. With paper and pen in hand I came up with the following code based on what OpenGL does (structural). (pseudocode below)
The resulting code above would produce a box with specific dimensions, color, title, button state, etc. This could be a MesageBox, Console, whatever.
USAGE:
GUI_CONSOLE = unique enum identifier that defines a console. GUIBegin( {GUI_CONSOLE} {GUI_MSGBOX} {GUI_LOADER}, .. ); (BNF format)
id = UINT, WPARAM, LPARAM, other?
GUI_ACTIVE = status of a botton (click, release) GUI_ACTIVE | GUI_HIDE
result = return value defining the result of a key stroke or mouse click.
The reason as to why build it this way is simplicity and ease (or not). Second, since I am looking for more abstraction to design this might provide a means to do just that. With this type of abstration it should eleaviate a 'coupling' problem (as far as I understand the term). Or perhapse a better way to say it is, to reduce the interdependency.
Any thoughts as to how to implement the "GUIBegin(..)" and "GUIEnd()" scoping problem? Any other comments, thoughts, ideas.
Sabrina.
Okay, let see if I can make this clear. I am designing and developing a GUI interface for users. With paper and pen in hand I came up with the following code based on what OpenGL does (structural). (pseudocode below)
The resulting code above would produce a box with specific dimensions, color, title, button state, etc. This could be a MesageBox, Console, whatever.
USAGE:
GUI_CONSOLE = unique enum identifier that defines a console. GUIBegin( {GUI_CONSOLE} {GUI_MSGBOX} {GUI_LOADER}, .. ); (BNF format)
id = UINT, WPARAM, LPARAM, other?
GUI_ACTIVE = status of a botton (click, release) GUI_ACTIVE | GUI_HIDE
result = return value defining the result of a key stroke or mouse click.
The reason as to why build it this way is simplicity and ease (or not). Second, since I am looking for more abstraction to design this might provide a means to do just that. With this type of abstration it should eleaviate a 'coupling' problem (as far as I understand the term). Or perhapse a better way to say it is, to reduce the interdependency.
Any thoughts as to how to implement the "GUIBegin(..)" and "GUIEnd()" scoping problem? Any other comments, thoughts, ideas.
Sabrina.