Combobox


Case study of the ComboBox component

img

  1. Example
  2. Notes
  3. Tasks

Example:

swift:

let xml = FileParser.xml("~/Desktop/assets/xml/combobox.xml".tildePath)
let dp:DataProvider = DataProvider(xml)
let combobox = addSubView(ComboBox(170,104,24,dp,false,0,self))

Notes:

vimeo video
dropbox video

Tasks:

  • [x] Figure out how to listen to mouseEvents outside and inside NSWindow (maybe use local and global monitors)
  • [x] try to open the popover window when the origin window is in fullscreen mode (works)
  • [x] on click outside of the popup window needs to be recorded
  • [x] click a button in popupWin sends an event and then closes it self
  • [x] the popupWindow needs to be stored somewhere, maybe in a static variable or somewhere else in the Element framework
  • [ ] Make an universal alignment method for aligning windows, you can probably use the regular Align method here with a zeroSize and CGPoint and TopCenter as the alignment type
  • [x] try to animate the popup effect
  • [x] the popupwin must have an init with size and position,
  • [x] populate the window with a List/SliderList
  • [x] hock up the List event
  • [x] create the ComboBoxPopUpWindow
  • [ ] you need a method that checks available space for the popup to be shown in (measure screen vs origin-pos vs popup-size) <–do some doodling etc
  • [x] 4px top and bottom margin for the comboboxwin, to avoid clipping the rounded corners
  • [x] blue color when selected, white text when selected.
  • [x] Try to align the comboboxwin with simple means first -> 1. find the bottom left pos of the combobox header button, 2. convert this position into screen coordinates -> similar to how you did draggin windows etc
  • [ ] to create an universal alignment method you need 2 alignment types passed to the PopUpWin and then PopUpwin will take care of the rest
  • [x] Research close animation for NSWindow
  • [ ] Implement SliderList instead of List

Related Posts

Infinite Tree List

My notes on Infinite tree list

Protocol Inheritance

My notes on Protocol Inheritance

Protocol Ambiguity

How to differentiate protocol ambiguity

The Ultimate Xcode Workflow

Spend zero time managing dependencies

Faster Xcode With Spm

How you can speed up compile times in XCode with Swift Package Manager

Spm And Ci Travis

My notes on Swift PM + CI Travis

Spm And Nested Frameworks

My notes on Swift package manager + XCode + Nested frameworks

Xcode And Spm

Here is how you use Swift package manager in your XCode app projects

Carthage And Nested Frameworks

A few workflows concerning Carthage and nested framework

Two Finger Swipe

Notes on implementing two finger swipe for macOS