UI Widgets - norns-study-group/pirate-radio GitHub Wiki
Widgets we need for the pirate radio
Notes
- some components that extend AbstractComponent (e.g. Slider) contain other components that themselves that extend AbstractComponent (e.g. Pointer)
Non-visual
- Container
- Controller (keeps track of state)
- Interface (encoders and keys)
- Group
- Layout (positioner)
- Skin (ui configurator)
Visual
-
AbstractComponent
- Constructor
- AbstractComponent:new(args)
- Parameters
- width: number (default: __)
- height: number (default: __)
- x: number (default: __)
- y: number (default: __)
- selected: boolean (default: false)
- selected_level: number (default: __)
- unselected_level: number (default: __)
- Functions
- AbstractComponent:redraw()
- AbstractComponent:get_selected()
- Return:
- (boolean) selected
- Return:
- AbstractComponent:set_selected(boolean sel)
- AbstractComponent:get_x()
- Return:
- (number) x location
- Return:
- AbstractComponent:set_x(number x_loc)
- AbstractComponent:get_y()
- Return:
- (number) y location
- Return:
- AbstractComponent:set_y(number y_loc)
- Propertiess
- selected: boolean (default: false)
- Implementation Status/Notes
- (Status) documentation in progress
- Constructor
-
BackgroundImage
-
Button
-
ButtonMute
-
ButtonToggle
-
ButtonWindowing
-
Dial
-
Page (views)
-
Pointer (views)
- child of AbstractComponent
- Constructor
- Slider:new(args)
- used by Slider to indicate the current value ()
- Parameters:
- orientation: string sets the pointer's orientation to vertical (v) or horizontal (h) (default: v)
- size: number the width or height of the pointer, depending on the orientation
- Functions
- Pointer:redraw()
-
Implementation Status/Notes
- (Status) documentation in progress
-
Slider
- child of AbstractComponent
- Constructor
- Slider:new(args)
- Parameters
- orientation: string sets the slider orientation to vertical (v) or horizontal (h) (default: v)
- min: number (default: 0)
- max: number (default: 100)
- tick_labels: table (default: {20,40,60,80})
- warp: string (exp, db, lin) a shaping option for incoming data (default: lin)
- Functions
- Slider:redraw()
- Properties
- Functions
- Slider:get_slider_location()
- Return:
- (number) location_of_pointer
- Return:
- Slider:get_slider_location()
- Included Classes
- Pointer
- Implementation Status/Notes
- (Status) documentation in progress
- the width and height of the visual elements need to be set differently in the init function depending on the orientation
-
Text
-
TextEntry
-
TextSongTicker
-
TextPopup
-
TextTimer
-
Window