Skip to content

Latest commit

 

History

History
208 lines (202 loc) · 10.1 KB

TODO

File metadata and controls

208 lines (202 loc) · 10.1 KB

-*- org -*-

Open Issues

I have a class with :initform for some slots.

I want to make an instance of that class with a helper function. It seems that I need to duplicate the initforms as defaults to &key arguments of the helper function. Is there a way around this?

There’s class textattr, inherited by both label and textbox.

How can I copy the textattr slots from label to textbox?

layout options for boxes

add layout options

tests for layout options (separate demos for vertical and horizontal)

update other tests to use layout options

button widget (events, mouse clicks, states);

scrollbar;

slider;

horizontal

vertical

arrow buttons

grid layout;

first cut;

add offsets on the cell arrangement DSL;

add column and row spans;

add row and column layout options (similar to boxes);

first cut;

move the grid into its own package (it has many helper functions)

write some tests for the column/row layout options

change vertical and horizontal boxes to be one dimensional grids

decided not to do it, boxes are faster

add aligner widgets that use a grid to align their child

added a separate aligner widget - faster

change the helper macros from scenic-macros into functions;

redefine the package and file to ‘scenic-helpers’.

rename the helper functions in :scenic-helper to sane alternatives;

min/max controls (they force the min/max width/height for their child)

clipper class

refactor the measure-* and layout-* setting

  • add separate methods for them, don’t call-next-method to do it;
  • factor the duplicated code for background and clipper into the measure/layout for container1

opacity class

grid processing - in the same order that the controls

appeared in the lisp source (reverse the lists at the end of apply-children-descriptions)

canvas class (top/left/bottom/right/width/height positioning)

called henchman

the paint method/event should have a ‘paint rect’

argument so that we now what we need to paint; this is necessary for datagrids and such, so that they don’t paint themselves completely all the time.

scroll view;

first cut (no scrollbars integration)

add scrollbars (integrate them with a helper function)

scrollbars should disappear when not needed (enhance helper function)

hit-testing should work correctly with scroll views

when sending paint/mouse events to widgets within scroll views,

the coordinates should be adjusted to match the ones in the layout-… slots of the widgets.

test with nested scroll-views

this could mean textboxes inside a scroll view

fix the scrollbar bug;

When dragging, it is always assumed we are dragging the middle of the walker; we should drag according to the position of the mouse relative to the walker when the dragging started;

scrollbar bug;

the walker should touch the right/bottom arrow if the current min pos + page size is max pos (maybe round the width/height up?)

REPRO: see the scroll-view-1 test CANNOT REPRO.

fix the box layout bug

(if there is not enough space, some elements are not measured; they should be measured with space 0)

org stuff

break the events into a separate package

break the containers into a separate package

break the tests into more suites

move tests to separate folder

text box;

fix the focus (should ‘cascade’ and ‘bubble’ propagate key events,

not just call the event on the widget that has focus))

clicking on the textbox should give it focus

  • textbox should inherit from clickable so it has the :click event
  • scene shoud have a ‘focus-widget’ method that transfers focus to a particular widget

when clicking on a textbox, the cursor position should be updated

“scrolling”

editing

bug: the caret should be pushed +0.5 px horizontally,

unless it is on the rightmost margin, when it should be pushed -0.5px

when clicking on the textbox, place the cursor on

the space between chars, not before the clicked char; i.e., determine the space between chars closest to the click.

selection

drawing, basic behavior

clipboard interaction - xclip on X, what do I do on Windows?

add license information

use an .asd file (initial version from Orivej Desh)

popups/dialogs;

when a popup is hidden, the area underneath must be redrawn

so the scene needs an additional slot, rectangles-to-redraw which will add to the dirty list

menubar/menu;

combo box;

checkbox/radio box;

themes/widget factories;

unit tests (e.g. for the grid layout)

Make tests cheap (there is no code to be written, it’s only necessary to redo the sequence of events and tell the test framework whether the test passed or failed). This way it doesn’t matter so much if the tests are fragile (as in easily broken by changes to the interface).

naming of widgets (both explicit and automatic)

recording of input events

test channel where reactions to events are recorded

matching a recorded session of input events and

reactions on the test channel with a ‘blind’ run of the input events (and new reactions on the test channel)

handling of asynchronous events (test channel replies

can arrive in different orders); markup for the start of the async interval and the end? other ways to handle this.

optimization settings all in one place (reader macro with declaim?)

scenes have a name, the name of the scene is placed in the

window title;

tree widget

datagrid widget

minesweeper and solitaire demos :-)

the focus event should be sent to the

whole widget chain

bug: in the scroll view demos only the sliders are painted

(after removing the idle render-scene stuff; probably need to add some “invalidate” calls)

see why the whole scene is repainted in scroll-view-mouse-adjust

… when I press the button in the left upper corner.

Probably because the scroll-view itself is marked for repainting. Idea: widgets that don’t do any painting (such as the scroll view) should not ‘make dirty’ the widgets they intersect with. The reason we need the scroll-view is that it takes care of displacing the button (which we need to repaint) and setting the clip rectangle correctly.

auto-testing fails because fonts are rendered with slightly different sizes

on different systems.

One solution is to use monospace by default and setup a list of acceptable dimensions. This means I’m not testing the actual font measuring code, but it will have to do for now.

interface with bordeaux-threads

animations? (with threads or simply with the idle event)

use a thread with SLEEP to schedule animation events

so we can serialize thread based scenarios for automated testing

thread allocation scheme

must be on the UI thread to allocate new threads

use a hash to map threads to our thread-ids

periodically clean the hash (remove dead threads from it)

throw an error if add-task is called from a thread that is not in the hash

put the ui thread in the hash as thread 0

now we no longer need to control the thread names

  • (make turn allocate-thread accept a name for created threads into register-thread or; alternatively, turn it into register-thread that takes an existing thread and adds it to our hash)
  • nope, registering can’t work (we can’t let threads decide when to register, they might decide to register in another order in the test run)

the hash is protected by the same lock we’re using for the rest

of the data structures

visibility for widgets

  • t or nil, if t the widget is measured and painted, if nil the widget has dimensions 0,0 and is not painted

update the grid to allow priority for :auto columns and rows layout options

update the boxes to allow priority for :auto layout options

actually completely removed boxes

use the visibility to hide not needed scrollbars for scroll-view-auto

add options to scroll-view-auto to specify whether scroll

fix the bug: scroll-view-2:

horizontal scrollbars should appear if they become necessary after adding the vertical scrollbar; likewise, vertical scrollbars should appear if they are required after adding the horizontal scrollbars.

BUG: all radio-buttons in a group can be unchecked

(at least one radio button must be turned on)

add again the simple box layout (horizontal and vertical)

write some tests for simple boxes

add a dock panel layout

write tests for the dock panel layout

Glass

glass with opacity 0 is a special case: usable for popus/menus/dialogs

glass with 0 < opacity < 1 is a special case which

invalidates the widgets it intersects and are underneath it.

main loop

see if processing all the events in the idle event

works (we’d like to add some event filtering and stuff to avoid multiple layouts when the user is rapidly resizing the window)

render-scene only at end of the batch of events

record batches of events for testing;

use the same function for testing, but with a different render-scene

(make it a parameter)

remove the :down/:up parameters from scene-on-mouse-button, scene-on-key

because all the necessary information is now inside the event arg

don’t record the event type (also because we now

have all the information in the events)

this change implies redoing all the tests (it breaks the gzipped archives)

special handling for ESC should be moved to test-scene

(it should add an event handler that quits when ESC is pressed)

  • it should also remove that handler after the test is done (which means adding remove-event-handler)