libui/TODO.md

3.4 KiB

  • consider calling setAppleMenu: for the application menu; it doesn't seem to make much of a difference but
  • make the name of the variable to refer to a single tab page consistent (already decided to make them all page)
  • make sure uiEntryOnChanged() is not triggered when calling uiEntrySetText()
  • clean up windows resizing logic
    • make it so that only top-level window resizes trigger an update; container resizes do not update
      • windows resizing logic is simply not comprehensive enough (no null resizes allowed) to do things
      • we control resizes of all children so we can reliably update after a resize
      • we already need to do this in uiContainer :/
  • make it so Windows API calls that do logLastError(), etc. abort whatever they're doing and not try to continue, just like wintable
  • 32-bit Mac OS X support (requires lots of code changes)
    • change the build system to be more receptive to arch changes
  • http://stackoverflow.com/questions/4543087/applicationwillterminate-and-the-dock-but-wanting-to-cancel-this-action

ultimately:

  • add some sort of runtime type checking
  • MAYBE readd lifetime handling/destruction blocking
  • figure out how to integrate leak checking into the source tree
  • assign control IDs on windows
    • GWL(P)_ID
    • related? [12:25] And the blue outline on those buttons [ALL clicked buttons on Windows 7] won't go away
      • I get this too
  • SWP_NOCOPYBITS to avoid button redraw issues on Windows when not in tab, but only when making resize faster
  • opposite side alignment control in uiBox
  • collapse multiple consecutive menu separators?
    • including for quit/preferences/about?
      • or not even have separators there?
        • in which case, hide leading or trailing separators?
  • generate libui.lib and related files
  • rename newcontrol.[cm] to control.[cm] or something else?
  • make OS-specific headers generated by an IDL
  • figure out what to do on Windows and GTK+ if we don't have menus but the user wants a menubar (zero-height widget? don't bother? complain?)
  • bin.c
    • find a way to consolidate the duplicate code across OSs
    • find a way to move the has parent check at the beginning of binDestroy()
    • determine whether or not margins count in preferredSize() when there is no main control
  • menu item state change while the menu is visible (not in response to user action)
    • OS X: requires an [NSMenu update] call after changing state
    • Windows: requires getting current menu state when amending it in sync()
  • figure out where we should return HRESULTs
  • Windows: don't abort if a cleanup function fails?
  • drop "Page" from uiTab method names? (uiTabAppendPage() -> uiTabAppend())

notes to self

  • explicitly document label position at top-left corner
  • mark that uiControlShow() on a uiWindow() will bring to front and give keyboard focus because of OS X
    • make sure ShowWindow() is sufficient for zorder on Windows
  • document that you can't use InsertBefore functions to insert before a nonexistent index (that includes if an array is empty)
    • reconsider this, as the pointer array code does work with the first invalid index...
      • we would need to test everything else with it
  • note that uiTabInsertPageBefore() does NOT change the current tab page (it may change its index if inserting before the current page)
  • note that the default action for uiWindowOnClosing() is to return 0 (keep the window open)
  • note that uiInitOptions should be initialized to zero