Mercurial > projects > mde
diff codeDoc/ideas.txt @ 159:b06b04c75e86
Finished last commit, rearranged code for the WidgetManager class.
There is now a GUI options section.
Created a third WidgetManager class called WidgetLoader to handle file loading/saving.
Moved most of the code in WMScreen's draw/clickEvent/motionEvent functions to WidgetManager.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 21 May 2009 20:55:10 +0200 |
parents | e785e98d3b78 |
children | 55667d048c31 |
line wrap: on
line diff
--- a/codeDoc/ideas.txt Fri Apr 24 17:35:53 2009 +0100 +++ b/codeDoc/ideas.txt Thu May 21 20:55:10 2009 +0200 @@ -13,8 +13,16 @@ -> decent rendering/theme system -> events: -> Click events: widgets only receive clickEvent for left-button press, other button events handled alternatively from WidgetManager? - -> Click callbacks: replace with "drag callback" notifying widget of release position (and widget)? - -> possibly better for drag-and drop support + -> Click/drag handling: + -> on click: + -> clicked widget recieves depress event + -> create drag monitor, which records parent and optionally runs parent method on move (which can find the widget/drop-zone underneath) + -> on release: + -> method from either dragged or drop-zone widget called with reference to the other: + -> perhaps function in dragged widget called, which is passed reference of widget underneath, and can call getDropZoneAncestor on this + -> drag/drop-like possibilities: + -> magnifier which is dragged from icon, creates a magnified window, and disappears on release + -> colour-picker which is dragged from a widget and dropped to choose the colour under it -> Keyboard widget focus/selection: -> a widget is highlighted -> pressing an arrow key replaces widget with widget.nextInDirection (widget, direction) @@ -66,6 +74,9 @@ +> can use a static list widget for each type -> clipboard is type specific; need to decide when to convert, etc. +> enables better copying; e.g. from double 3.5e9 to int 4×10⁹ + > Context menus: + > Context menu serves (editable?) content most directly under mouse cursor + > plus content higher up widget tree? > Non-static content manager > Separate managers for options, GUI symbols, data fields, passwords(?) > Optional saving/loading @@ -82,5 +93,39 @@ -> more work, recreating sub-widgets > dynamic lists (add/remove elts) > have to rebuild lists +> Widget content? Extend content with a validator function/delegate, specific to each class, which takes the new value and returns it or a corrected version of it. Not so good to do it generally from Content, since setting a new value via usual method will re-trigger validator and callbacks (e.g. bad validator could cause infinite loop). + + + +From paper: +Text styles: +> use a few styles + > number and purpose of each hard-coded? + > titlebar, label, button, field, etc. + > renderer or something maps a font (font file, size, style) to each style + +GUI editor: +> Widgets are wrapped with/replaced by drag & drop widgets: + > widgets can be dragged to another drop-zone widget + > widgets can be dragged to a bin or scrap area + > new widgets can be dragged from templates + > widgets can be copied by holding Ctrl + > widgets displaced by another are moved to the scrap area +> side bar/editor controls: + > tree showing current widget structure + > widgets can be moved (by dragging), restructured, etc. from here the same as from the WYSISYG view + > new widget panel + > for creating new single widgets + > for creating new mini-trees from templates + > scrap panel + > widgets can be dragged here from WYSIWYG or tree views + > widgets can even be edited here + > widgets remaining on program/editor exit are lost? + > properties panel + > for setting widget options (initialisation data) + > profile selection (section of config file to save to) +> for easy access to editor (power GUI dev mode) + > include a theme selection box on the GUI + > include a button to turn the editor on/off