Documented scrollbars on Listbox and Area to the best of my ability, shuffling the appropriate TODOs around.
This commit is contained in:
parent
7b8580b12d
commit
09e92b0eb3
2
area.go
2
area.go
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
// Area represents a blank canvas upon which programs may draw anything and receive arbitrary events from the user.
|
||||
// An Area has an explicit size, represented in pixels, that may be different from the size shown in its Window; scrollbars are placed automatically should they be needed.
|
||||
// An Area has an explicit size, represented in pixels, that may be different from the size shown in its Window; Areas have horizontal and vertical scrollbars that are hidden when not needed.
|
||||
// The coordinate system of an Area always has an origin of (0,0) which maps to the top-left corner; all image.Points and image.Rectangles sent across Area's channels conform to this.
|
||||
//
|
||||
// To handle events to the Area, an Area must be paired with an AreaHandler.
|
||||
|
|
|
@ -9,6 +9,8 @@ import (
|
|||
|
||||
// A Listbox is a vertical list of items, of which either at most one or any number of items can be selected at any given time.
|
||||
// On creation, no item is selected.
|
||||
// Listboxes have vertical scrollbars that are hidden when not needed.
|
||||
// [TODO decide horizontal scrollbar behavior; only the Windows HIG explicitly says to do anything about them (in their case, avoid them unless the control has lots of info and is wide enough, such as a multi-column list) (the Mac OS X one says to just make lists wide enough and ellipsize if needed)]
|
||||
type Listbox struct {
|
||||
// TODO Select event
|
||||
|
||||
|
|
4
todo.md
4
todo.md
|
@ -17,9 +17,7 @@ important things:
|
|||
- Cocoa has similar margining issues (like Comboboxes having margins)
|
||||
- make gcc (Unix)/clang (Mac OS X) pedantic about warnings/errors; also -Werror
|
||||
- problem: cgo-generated files trip -Werror up; I can't seem to turn off unused argument warnings with the -Wall/-Wextra/-pedantic options
|
||||
- make sure scrollbars in Listbox work identically on all platforms (specifically the existence and autohiding of both horizontal and vertical scrollbars)
|
||||
- pin down this behavior; also note non-editability
|
||||
- I think the behavior is, for the most part, a platform detail; perhaps a better option is to simply dictate the autohiding of scrollbars and the appearance of horizontal scrollbars for both Listbox and Area (this will also let us consolidate scroll view code in GTK+ and Mac OS X)
|
||||
- consolidate scroll view code in GTK+ and Mac OS X
|
||||
- make sure mouse events don't trigger if the control size is larger than the Area size and the mouse event happens outside the Area range on all platforms
|
||||
- area test time label weirdness
|
||||
- does not show anything past the date on windows
|
||||
|
|
Loading…
Reference in New Issue