|
kurt miller's homepage
( My development journal and homepage has moved to a new system here: kurtm.flipcode.com ) |
|||
I spent some time tonight putting together a somewhat generic interface with which I can build any of the tools that my engine needs. The idea is based on the simple observation that virtually any tool I need to write requires the following: 1) a dialog with appropriate controls for settings/operations, and 2) visual output/interaction (either rendering or text/progress output.) So my goal was to build a framework with an open pane on the left for dialog controls, and a rendering window on the right. The interesting bit is that each tool is built within its own DLL and loaded on the fly. When a new tool is loaded, its tab is added on the right-hand side. When the user selects an appropriate tool from that list, the entire left-hand panel is swapped out with the dialog window associated with that specific tool in the DLL. The left-hand panel also supports vertical scrolling, so in theory the controls for a specific tool can be on one really tall window that's scrollable. I'll likely add swapping support for custom tool menus and toolbars as well. Here's a screenshot of the basic working interface: ![]() At creation time, a given tool specifies whether it wants access to the 2D (pixel buffer) or 3D rendering interface, assuming it needs to render anything. The appropriate renderer is shown when the tool is activated. The tool manages all its own data and rendering, meaning each tool is completely self-contained in the DLL and doesn't interact with any others. The right-hand side also has a collapsable "console" output window, down where that + button is. For tools that don't render anything, the console is shown for any text output. So basically its just a way of combining a bunch of standalone tools into one generic framework with the ability to render stuff and manipulate settings. I didn't end up using wxWidgets for this after all, just plain win32 API code since the interface turned out to be really simple. |
|||
| Site Contents Copyright (c) 2002-2004 Kurt Miller. Please do not reprint this jibberish anywhere. |