root/codeDoc/ideas.txt

Revision 174:3d58adc17d20, 6.6 kB (checked in by Diggory Hardy <diggory.hardy@gmail.com>, 2 years ago)

Temporary commit to allow backup

Line 
1 Copyright © 2007-2008 Diggory Hardy
2 License: GNU General Public License version 2 or later (see COPYING)
3
4
5 Make a special "trace" logger which keeps the last 20, say, trace messages and only output them when asked to do so, which might happen when an exception is caught. It might output them via the normal mechanisms, but only when asked (and not all messages may be in the correct order: trace messages might be logged later than they were added to the list).
6
7 Use debug scope(failure) to output log messages in many places.
8
9
10 GUI:
11 ->  Widgets:
12   > generalise concept of 2D widgets:
13     > some other way of specifying a widget's dimensions
14     > divide layout widget into a sub-widget handler and a placement component, such that placement can use a rectangle, hexagon or whatever component
15   > Menu widgets:
16     > Need BoolContentWidget with name in menu
17       > Special widget?
18 ->  scripted widgets
19 ->  decent rendering/theme system
20 ->  events:
21     ?>  Click events: WidgetManager separates out actions:
22        >  left-click down:
23      >  starts drag monitor, visually depresses buttons
24        >  calls downClick, which can return codes to enable dragging, etc.
25      >  if mouse moved more than dragStartDistance from click-position and dragging-from-widget available, start drag mode:
26        >  visual feedback for dragging
27        >  releasing does drag action; releasing on start widget cancels action
28      >  otherwise, releasing does normal button effect (pass a eventClick)
29     *>  consequence: button click/release & dragging more managed by WM; possibly less flexible for widgets
30        >  dropContent(mouseClipboard): middle click paste action
31        >  ...: open context menu
32        >  eventScroll: scrolling event
33       ->  Issue: release-click for menu buttons needs to be passed separately
34     ->  Click/drag handling:
35     ->  drag/drop-like possibilities:
36         ->  magnifier which is dragged from icon, creates a magnified window, and disappears on release
37         ->  colour-picker which is dragged from a widget and dropped to choose the colour under it
38 ->  Keyboard widget focus/selection:
39     ->  a widget is highlighted
40     ->  pressing an arrow key replaces widget with widget.nextInDirection (widget, direction)
41     ->  on non-parents, nextInDirection returns parent.nextInDirection (this, direction)
42     ->  on parent widgets, if widget is a child and not right against relevent edge,
43             then tries to return next descendant in direction (only non-parent widgets are returned)
44             else does same as non-parent widgets
45         ->  some widgets may popup a menu when activated
46         ->  caveats:
47             ->  all widgets need a highlighted state to show focus
48             ->  may require moving through a lot of widgets
49             ->  with complicated substructures, may not be very intuitive
50     ->  limit to popup menus?
51     ->  these keyboard events only passed if activated by code outside the WidgetManager and no text input callback is active
52 >   Drawing windows/popups (to draw a back):
53     ->  Use the same renderer & manager:
54     ->  Make all widgets draw a back?
55         ->  bad for transparancy and performance
56     ->  Make only first widget draw a back
57         ->  extra parameter to pass in special cases
58         ?>  Transparency?
59         +>  Simple to implement
60     >   Use a sub-renderer
61     ->  extra parameter to pass
62     ->  or some kind of lookup by mgr
63     +>  enables nice transparancy
64     +>  Use a sub-manager
65     +>  holds a sub-renderer or something
66         +>  enables nice transparancy
67     ?>  integrates with popup support? will this work?
68     >   each floating/popup widget has its own renderer (last two above)
69     +>  combined rendering (to texture?) of each "layer" to enable nice transparancy
70     >   lower performance?
71 > Data:
72   > remove "designs" concept from WidgetLoader:
73     > have one design per file
74     > to load multiple designs, have multiple WidgetLoaders in memory (so each just stores one set of data)
75     > pass a reference to a WidgetLoader or whatever it's called to the WidgetManager
76       > instead of class extension
77       > allows easily swapping data sets
78
79
80 Content:
81 ->  Per-content undo support?
82 >   Possible extra services:
83     >   All content:
84     >   Some content:
85         +>  Spellchecking
86         +>  Calculator
87   > Context menus:
88     > Context menu serves (editable?) content most directly under mouse cursor
89     > plus content higher up widget tree?
90     > "Drag" option to drag from, instead of widget itself?
91 > Non-static content manager
92   > Separate managers for options, GUI symbols, data fields, passwords(?)
93     > Optional saving/loading
94     > Possibly different translation sources
95       > manager can take an optional Translator interface/super class, using it to translate strings if provided
96 > Lists
97   > filtering uses
98     > filter context menu services to those relevant
99     > user-filters on, e.g., options
100   > filtering implementations (list widget)
101     > keep all sub-widgets, but hide some cells
102       > takes advantage of fact that actual elts don't change
103     > rebuild list
104       -> more work, recreating sub-widgets
105   > dynamic lists (add/remove elts)
106     > have to rebuild lists
107 > Widget content?
108
109 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).
110
111
112
113 From paper:
114 Text styles:
115 > use a few styles
116   > number and purpose of each hard-coded?
117     > titlebar, label, button, field, etc.
118   > renderer or something maps a font (font file, size, style) to each style
119
120 GUI editor:
121 > Widgets are wrapped with/replaced by drag & drop widgets:
122   > widgets can be dragged to another drop-zone widget
123   > widgets can be dragged to a bin or scrap area
124   > new widgets can be dragged from templates
125   > widgets can be copied by holding Ctrl
126   > widgets displaced by another are moved to the scrap area
127 > side bar/editor controls:
128   > tree showing current widget structure
129     > widgets can be moved (by dragging), restructured, etc. from here the same as from the WYSISYG view
130   > new widget panel
131     > for creating new single widgets
132     > for creating new mini-trees from templates
133   > scrap panel
134     > widgets can be dragged here from WYSIWYG or tree views
135     > widgets can even be edited here
136     > widgets remaining on program/editor exit are lost?
137   > properties panel
138     > for setting widget options (initialisation data)
139   > profile selection (section of config file to save to)
140 > for easy access to editor (power GUI dev mode)
141   > include a theme selection box on the GUI
142   > include a button to turn the editor on/off
143
144
145 Uses:
146 > A universal XML generator/editor from XSD files?
Note: See TracBrowser for help on using the browser.