Documentation ¶
Index ¶
- Constants
- Variables
- func GetColourId(c *sdl.Color) uint32
- func GetResourceInstance() *sdl_Resources
- type ALIGN_TEXT
- type ENTRY_EVENT_TYPE
- type FILE_LIST_RESPONSE_CODE
- type KBD_KEY_MODE
- type LOG_LEVEL
- type ROTATE_SHAPE_90
- type SDL_Button
- type SDL_CanSelectText
- type SDL_Container
- type SDL_Entry
- func (b *SDL_Entry) ClearSelection()
- func (b *SDL_Entry) Click(md *SDL_MouseData) bool
- func (b *SDL_Entry) Destroy()
- func (b *SDL_Entry) Draw(renderer *sdl.Renderer, font *ttf.Font) error
- func (b *SDL_Entry) GetSelecteCharsFwd() string
- func (b *SDL_Entry) GetSelecteCharsRev() string
- func (b *SDL_Entry) GetSelectedText() string
- func (b *SDL_Entry) GetText() string
- func (b *SDL_Entry) Invalid(yes bool)
- func (b *SDL_Entry) KeyPress(c int, ctrl bool, down bool) bool
- func (b *SDL_Entry) MoveCursor(i int)
- func (b *SDL_Entry) SetCursor(i int)
- func (b *SDL_Entry) SetFocused(focus bool)
- func (b *SDL_Entry) SetSelecteCharsFwd(s string)
- func (b *SDL_Entry) SetSelecteCharsRev(s string)
- func (b *SDL_Entry) SetSelectedTextBounds(from, too uint) error
- func (b *SDL_Entry) SetText(text string)
- func (b *SDL_Entry) String() string
- type SDL_FileList
- type SDL_Image
- type SDL_ImageWidget
- type SDL_Label
- type SDL_LinkedWidget
- type SDL_MouseData
- func (md *SDL_MouseData) ActionMouseDown(me *sdl.MouseButtonEvent, id int32) *SDL_MouseData
- func (md *SDL_MouseData) ActionNotDragging(me *sdl.MouseMotionEvent) *SDL_MouseData
- func (md *SDL_MouseData) ActionReset(me *sdl.MouseButtonEvent) *SDL_MouseData
- func (md *SDL_MouseData) ActionStartDragging(me *sdl.MouseMotionEvent) *SDL_MouseData
- func (md *SDL_MouseData) ActionStopDragging(me *sdl.MouseButtonEvent) *SDL_MouseData
- func (md *SDL_MouseData) GetButtons() uint8
- func (md *SDL_MouseData) GetClickCount() int
- func (md *SDL_MouseData) GetDraggingX() int32
- func (md *SDL_MouseData) GetDraggingY() int32
- func (md *SDL_MouseData) GetWidgetId() int32
- func (md *SDL_MouseData) GetX() int32
- func (md *SDL_MouseData) GetY() int32
- func (md *SDL_MouseData) IsDown() bool
- func (md *SDL_MouseData) IsDragged() bool
- func (md *SDL_MouseData) IsDragging() bool
- func (md *SDL_MouseData) String() string
- type SDL_Separator
- type SDL_Shape
- func (s *SDL_Shape) Add(x, y int32)
- func (s *SDL_Shape) Draw(renderer *sdl.Renderer, font *ttf.Font) error
- func (s *SDL_Shape) GetRect() *sdl.Rect
- func (s *SDL_Shape) Rotate(angle int)
- func (s *SDL_Shape) Scale(sc float32)
- func (s *SDL_Shape) SetPosition(x, y int32) bool
- func (s *SDL_Shape) SetSize(w, h int32) bool
- type SDL_TextWidget
- type SDL_TextureCache
- type SDL_TextureCacheEntry
- type SDL_Widget
- type SDL_WidgetBase
- func (b *SDL_WidgetBase) CanFocus() bool
- func (b *SDL_WidgetBase) CanLog() bool
- func (b *SDL_WidgetBase) Click(md *SDL_MouseData) bool
- func (b *SDL_WidgetBase) Destroy()
- func (b *SDL_WidgetBase) GetBackground() *sdl.Color
- func (b *SDL_WidgetBase) GetBorderColour() *sdl.Color
- func (b *SDL_WidgetBase) GetDebounce() int
- func (b *SDL_WidgetBase) GetFocusColour() *sdl.Color
- func (b *SDL_WidgetBase) GetForeground() *sdl.Color
- func (b *SDL_WidgetBase) GetPosition() (int32, int32)
- func (b *SDL_WidgetBase) GetRect() *sdl.Rect
- func (b *SDL_WidgetBase) GetSize() (int32, int32)
- func (b *SDL_WidgetBase) GetWidgetId() int32
- func (b *SDL_WidgetBase) Inside(x, y int32) (SDL_Widget, bool)
- func (b *SDL_WidgetBase) IsClicked() bool
- func (b *SDL_WidgetBase) IsEnabled() bool
- func (b *SDL_WidgetBase) IsError() bool
- func (b *SDL_WidgetBase) IsFocused() bool
- func (b *SDL_WidgetBase) IsVisible() bool
- func (b *SDL_WidgetBase) KeyPress(c int, ctrl bool, down bool) bool
- func (b *SDL_WidgetBase) Log(id LOG_LEVEL, s string)
- func (b *SDL_WidgetBase) Scale(s float32)
- func (b *SDL_WidgetBase) SetBackground(c *sdl.Color)
- func (b *SDL_WidgetBase) SetBorderColour(c *sdl.Color)
- func (b *SDL_WidgetBase) SetClicked(v bool)
- func (b *SDL_WidgetBase) SetDeBounce(db int)
- func (b *SDL_WidgetBase) SetDrawBackground(e bool)
- func (b *SDL_WidgetBase) SetDrawBorder(e bool)
- func (b *SDL_WidgetBase) SetEnabled(e bool)
- func (b *SDL_WidgetBase) SetError(v bool)
- func (b *SDL_WidgetBase) SetFocusColour(c *sdl.Color)
- func (b *SDL_WidgetBase) SetFocused(v bool)
- func (b *SDL_WidgetBase) SetForeground(c *sdl.Color)
- func (b *SDL_WidgetBase) SetLog(f func(LOG_LEVEL, string))
- func (b *SDL_WidgetBase) SetOnClick(f func(string, int32, int32, int32) bool)
- func (b *SDL_WidgetBase) SetPosition(x, y int32) bool
- func (b *SDL_WidgetBase) SetPositionRel(x, y int32) bool
- func (b *SDL_WidgetBase) SetRect(r *sdl.Rect)
- func (b *SDL_WidgetBase) SetSize(w, h int32) bool
- func (b *SDL_WidgetBase) SetVisible(v bool)
- func (b *SDL_WidgetBase) SetWidgetId(widgetId int32)
- func (b *SDL_WidgetBase) ShouldDrawBackground() bool
- func (b *SDL_WidgetBase) ShouldDrawBorder() bool
- func (b *SDL_WidgetBase) String() string
- type SDL_WidgetGroup
- func (wg *SDL_WidgetGroup) AllSubGroups() []*SDL_WidgetSubGroup
- func (wg *SDL_WidgetGroup) AllWidgets() []SDL_Widget
- func (wg *SDL_WidgetGroup) ClearFocus()
- func (wg *SDL_WidgetGroup) ClearSelection()
- func (wg *SDL_WidgetGroup) Destroy()
- func (wg *SDL_WidgetGroup) Draw(renderer *sdl.Renderer)
- func (wg *SDL_WidgetGroup) GetFocusedWidget() SDL_Widget
- func (wl *SDL_WidgetGroup) GetWidgetSubGroup(id int32) *SDL_WidgetSubGroup
- func (wl *SDL_WidgetGroup) GetWidgetWithId(id int32) SDL_Widget
- func (wg *SDL_WidgetGroup) InsideWidget(x, y int32) SDL_Widget
- func (wg *SDL_WidgetGroup) KeyPress(c int, ctrl, down bool) bool
- func (wg *SDL_WidgetGroup) NewWidgetSubGroup(x, y, w, h, id int32, style STATE_BITS) *SDL_WidgetSubGroup
- func (wg *SDL_WidgetGroup) NextFrame()
- func (wg *SDL_WidgetGroup) Scale(s float32)
- func (wg *SDL_WidgetGroup) SetFocusedId(id int32)
- type SDL_WidgetSubGroup
- func (wl *SDL_WidgetSubGroup) Add(widget SDL_Widget) SDL_Widget
- func (wl *SDL_WidgetSubGroup) ArrangeGrid(rect *sdl.Rect, padding, rowHeight int32, colsW []int32) (int32, int32)
- func (wl *SDL_WidgetSubGroup) ArrangeLR(xx, yy, padding int32) (int32, int32)
- func (wl *SDL_WidgetSubGroup) ArrangeRL(xx, yy, padding int32) (int32, int32)
- func (wl *SDL_WidgetSubGroup) ClearFocus()
- func (wl *SDL_WidgetSubGroup) ClearSelection()
- func (wl *SDL_WidgetSubGroup) Click(md *SDL_MouseData) bool
- func (wl *SDL_WidgetSubGroup) Destroy()
- func (wl *SDL_WidgetSubGroup) Draw(renderer *sdl.Renderer, f *ttf.Font) error
- func (wl *SDL_WidgetSubGroup) GetFocusedWidget() SDL_Widget
- func (wl *SDL_WidgetSubGroup) GetFont() *ttf.Font
- func (wl *SDL_WidgetSubGroup) GetSmallestRect(within *sdl.Rect) *sdl.Rect
- func (wl *SDL_WidgetSubGroup) GetWidgetWithId(id int32) SDL_Widget
- func (wl *SDL_WidgetSubGroup) Inside(x, y int32) (SDL_Widget, bool)
- func (wl *SDL_WidgetSubGroup) KeyPress(c int, ctrl, down bool) bool
- func (wl *SDL_WidgetSubGroup) ListWidgets() []SDL_Widget
- func (wl *SDL_WidgetSubGroup) NextFrame()
- func (wl *SDL_WidgetSubGroup) Scale(s float32)
- func (wl *SDL_WidgetSubGroup) SetFocusedId(id int32)
- func (wl *SDL_WidgetSubGroup) SetFont(font *ttf.Font)
- func (wl *SDL_WidgetSubGroup) SetPosition(x, y int32) bool
- func (wl *SDL_WidgetSubGroup) SetPositionRel(x, y int32) bool
- type STATE_BITS
- type STATE_COLOUR
- type STYLE_COLOUR
Constants ¶
const ( FILE_LIST_CLOSE_CANCEL = iota FILE_LIST_FILE_SELECT FILE_LIST_PATH_UP FILE_LIST_PATH_SELECT )
const ( LOG_LEVEL_ERROR LOG_LEVEL = iota LOG_LEVEL_WARN LOG_LEVEL_OK ALIGN_CENTER ALIGN_TEXT = iota ALIGN_LEFT ALIGN_RIGHT ALIGN_FIT ROTATE_0 ROTATE_SHAPE_90 = iota ROTATE_90 ROTATE_180 ROTATE_270 ENTRY_EVENT_INSERT ENTRY_EVENT_TYPE = iota ENTRY_EVENT_DELETE ENTRY_EVENT_BS ENTRY_EVENT_FINISH ENTRY_EVENT_NONE ENTRY_EVENT_FOCUS ENTRY_EVENT_UN_FOCUS WIDGET_STYLE_NONE STATE_BITS = 0b0000000000000001 WIDGET_STYLE_DRAW_BORDER STATE_BITS = 0b0000000000000010 WIDGET_STYLE_DRAW_BG STATE_BITS = 0b0000000000001000 WIDGET_STYLE_DRAW_BORDER_AND_BG STATE_BITS = WIDGET_STYLE_DRAW_BORDER | WIDGET_STYLE_DRAW_BG WIDGET_STATE_ENABLED STATE_BITS = 0b0000000000010000 WIDGET_STATE_VISIBLE STATE_BITS = 0b0000000000100000 WIDGET_STATE_NOT_FOCUSED STATE_BITS = 0b0000000001000000 WIDGET_STATE_NOT_ERROR STATE_BITS = 0b0000000010000000 WIDGET_STATE_NOT_CLICKED STATE_BITS = 0b0000000100000000 WIDGET_STATE_STA_BITS STATE_BITS = 0b0000000111110000 // Clear state AND mask. Retains style. WIDGET_STATE_ENA_SET STATE_BITS = 0b0000000100110000 // Enabled visible and not-clicked WIDGET_COLOR_FG STYLE_COLOUR = 0 // Section indexes WIDGET_COLOR_BG STYLE_COLOUR = 1 WIDGET_COLOR_BORDER STYLE_COLOUR = 2 WIDGET_COLOR_ENTRY STYLE_COLOUR = 3 WIDGET_COLOR_MAX STYLE_COLOUR = 4 WIDGET_COLOUR_ENABLED STATE_COLOUR = 0 WIDGET_COLOUR_DISABLE STATE_COLOUR = 1 WIDGET_COLOUR_FOCUS STATE_COLOUR = 2 WIDGET_COLOUR_ERROR STATE_COLOUR = 3 DEG_TO_RAD float64 = (math.Pi / 180) )
Variables ¶
var TEXTURE_CACHE_TEXT_PREF = "TxCaPr987"
Functions ¶
func GetColourId ¶
func GetResourceInstance ¶
func GetResourceInstance() *sdl_Resources
Types ¶
type ALIGN_TEXT ¶
type ALIGN_TEXT int
type ENTRY_EVENT_TYPE ¶
type ENTRY_EVENT_TYPE int
type FILE_LIST_RESPONSE_CODE ¶
type FILE_LIST_RESPONSE_CODE int
type KBD_KEY_MODE ¶
type KBD_KEY_MODE int
type ROTATE_SHAPE_90 ¶
type ROTATE_SHAPE_90 int
type SDL_Button ¶
type SDL_Button struct { SDL_WidgetBase // contains filtered or unexported fields }
*************************************************************************************** * SDL_Button code * Implements SDL_Widget cos it is one! * Implements SDL_TextWidget because it has text and uses the texture cache *
func NewSDLButton ¶
func NewSDLButton(x, y, w, h, id int32, text string, style STATE_BITS, deBounce int, onClick func(string, int32, int32, int32) bool) *SDL_Button
func (*SDL_Button) GetText ¶
func (b *SDL_Button) GetText() string
func (*SDL_Button) SetText ¶
func (b *SDL_Button) SetText(text string)
type SDL_CanSelectText ¶
type SDL_CanSelectText interface { ClearSelection() GetSelectedText() string }
type SDL_Container ¶
type SDL_Container interface { Add(SDL_Widget) SDL_Widget ListWidgets() []SDL_Widget GetWidgetWithId(int32) SDL_Widget SetFocusedId(int32) GetFocusedWidget() SDL_Widget ClearFocus() Inside(int32, int32) (SDL_Widget, bool) NextFrame() }
type SDL_Entry ¶
type SDL_Entry struct { SDL_WidgetBase // contains filtered or unexported fields }
*************************************************************************************** * SDL_Label code * Implements SDL_Widget cos it is one! * Implements SDL_TextWidget because it has text and uses the texture cache *
func NewSDLEntry ¶
func NewSDLEntry(x, y, w, h, id int32, text string, style STATE_BITS, onChange func(string, string, ENTRY_EVENT_TYPE) (string, error)) *SDL_Entry
func (*SDL_Entry) ClearSelection ¶
func (b *SDL_Entry) ClearSelection()
func (*SDL_Entry) Click ¶
func (b *SDL_Entry) Click(md *SDL_MouseData) bool
func (*SDL_Entry) GetSelecteCharsFwd ¶
func (*SDL_Entry) GetSelecteCharsRev ¶
func (*SDL_Entry) GetSelectedText ¶
func (*SDL_Entry) MoveCursor ¶
func (*SDL_Entry) SetFocused ¶
func (*SDL_Entry) SetSelecteCharsFwd ¶
func (*SDL_Entry) SetSelecteCharsRev ¶
func (*SDL_Entry) SetSelectedTextBounds ¶
type SDL_FileList ¶
type SDL_FileList struct { SDL_WidgetSubGroup // contains filtered or unexported fields }
func NewFileList ¶
func NewFileList(x, y, rh, id int32, currentPath string, font *ttf.Font, style STATE_BITS, onSelect func(string, FILE_LIST_RESPONSE_CODE, int32) bool, filter func(bool, string) bool) (*SDL_FileList, error)
func (*SDL_FileList) Close ¶
func (fl *SDL_FileList) Close(r FILE_LIST_RESPONSE_CODE)
func (*SDL_FileList) Reload ¶
func (fl *SDL_FileList) Reload(currentPath string)
func (*SDL_FileList) Show ¶
func (fl *SDL_FileList) Show(viewPort sdl.Rect)
type SDL_Image ¶
type SDL_Image struct { SDL_WidgetBase // contains filtered or unexported fields }
*************************************************************************************** * SDL_Image code * Implements SDL_Widget cos it is one! * Implements SDL_TextWidget because it has text and uses the texture cache *
func NewSDLImage ¶
func (*SDL_Image) GetFrameCount ¶
type SDL_ImageWidget ¶
type SDL_Label ¶
type SDL_Label struct { SDL_WidgetBase // contains filtered or unexported fields }
*************************************************************************************** * SDL_Label code * Implements SDL_Widget cos it is one! * Implements SDL_TextWidget because it has text and uses the texture cache *
func NewSDLLabel ¶
func NewSDLLabel(x, y, w, h, id int32, text string, align ALIGN_TEXT, style STATE_BITS) *SDL_Label
type SDL_LinkedWidget ¶
type SDL_LinkedWidget struct {
// contains filtered or unexported fields
}
type SDL_MouseData ¶
type SDL_MouseData struct {
// contains filtered or unexported fields
}
*************************************************************************************** * SDL_MouseData * Used to pass mouse activity to the widgets * *
func (*SDL_MouseData) ActionMouseDown ¶
func (md *SDL_MouseData) ActionMouseDown(me *sdl.MouseButtonEvent, id int32) *SDL_MouseData
func (*SDL_MouseData) ActionNotDragging ¶
func (md *SDL_MouseData) ActionNotDragging(me *sdl.MouseMotionEvent) *SDL_MouseData
func (*SDL_MouseData) ActionReset ¶
func (md *SDL_MouseData) ActionReset(me *sdl.MouseButtonEvent) *SDL_MouseData
func (*SDL_MouseData) ActionStartDragging ¶
func (md *SDL_MouseData) ActionStartDragging(me *sdl.MouseMotionEvent) *SDL_MouseData
func (*SDL_MouseData) ActionStopDragging ¶
func (md *SDL_MouseData) ActionStopDragging(me *sdl.MouseButtonEvent) *SDL_MouseData
func (*SDL_MouseData) GetButtons ¶
func (md *SDL_MouseData) GetButtons() uint8
func (*SDL_MouseData) GetClickCount ¶
func (md *SDL_MouseData) GetClickCount() int
func (*SDL_MouseData) GetDraggingX ¶
func (md *SDL_MouseData) GetDraggingX() int32
func (*SDL_MouseData) GetDraggingY ¶
func (md *SDL_MouseData) GetDraggingY() int32
func (*SDL_MouseData) GetWidgetId ¶
func (md *SDL_MouseData) GetWidgetId() int32
func (*SDL_MouseData) GetX ¶
func (md *SDL_MouseData) GetX() int32
func (*SDL_MouseData) GetY ¶
func (md *SDL_MouseData) GetY() int32
func (*SDL_MouseData) IsDown ¶
func (md *SDL_MouseData) IsDown() bool
func (*SDL_MouseData) IsDragged ¶
func (md *SDL_MouseData) IsDragged() bool
func (*SDL_MouseData) IsDragging ¶
func (md *SDL_MouseData) IsDragging() bool
func (*SDL_MouseData) String ¶
func (md *SDL_MouseData) String() string
type SDL_Separator ¶
type SDL_Separator struct {
SDL_WidgetBase
}
*************************************************************************************** * SDL_Image code * Implements SDL_Widget cos it is one! * Implements SDL_TextWidget because it has text and uses the texture cache *
func NewSDLSeparator ¶
func NewSDLSeparator(x, y, w, h, id int32, style STATE_BITS) *SDL_Separator
type SDL_Shape ¶
type SDL_Shape struct { SDL_WidgetBase // contains filtered or unexported fields }
*************************************************************************************** * SDL_Shape code. * Implements SDL_Widget cos it is one! *
func NewSDLShape ¶
func NewSDLShapeArrowRight ¶
func (*SDL_Shape) SetPosition ¶
type SDL_TextWidget ¶
type SDL_TextureCache ¶
type SDL_TextureCache struct {
// contains filtered or unexported fields
}
*************************************************************************************** * Texture cache for widgets that have textures to display. * Textures are sdl resources and need to be Destroyed. * SDL_WidgetList destroys all textures via the SDL_Widgets Destroy() function. * SDL_WidgetGroup destroys all textures via SDL_WidgetsGroup Destroy() function * USE: widgetGroup := NewWidgetGroup() * defer widgetGroup.Destroy() *
func NewTextureCache ¶
func NewTextureCache() *SDL_TextureCache
func (*SDL_TextureCache) Add ¶
func (tc *SDL_TextureCache) Add(name string, tceIn *SDL_TextureCacheEntry)
func (*SDL_TextureCache) Destroy ¶
func (tc *SDL_TextureCache) Destroy()
func (*SDL_TextureCache) Peek ¶
func (tc *SDL_TextureCache) Peek(name string) bool
func (*SDL_TextureCache) Remove ¶
func (tc *SDL_TextureCache) Remove(name string, tceIn *SDL_TextureCacheEntry)
func (*SDL_TextureCache) String ¶
func (tc *SDL_TextureCache) String() string
type SDL_TextureCacheEntry ¶
type SDL_TextureCacheEntry struct { Texture *sdl.Texture W, H int32 // contains filtered or unexported fields }
*************************************************************************************** * Texture cache Entry used to hold ALL textures in the SDL_TextureCache *
func (*SDL_TextureCacheEntry) Destroy ¶
func (tce *SDL_TextureCacheEntry) Destroy() int
func (*SDL_TextureCacheEntry) ScaledWidthHeight ¶
func (tce *SDL_TextureCacheEntry) ScaledWidthHeight(txtH, clientW int32) (int32, int32, int32)
type SDL_Widget ¶
type SDL_Widget interface { Draw(*sdl.Renderer, *ttf.Font) error Scale(float32) Click(*SDL_MouseData) bool SetOnClick(func(string, int32, int32, int32) bool) // Base Inside(int32, int32) (SDL_Widget, bool) // Base GetRect() *sdl.Rect // Base SetRect(*sdl.Rect) // Base SetWidgetId(int32) // Base GetWidgetId() int32 // Base SetVisible(bool) // Base IsVisible() bool // Base SetClicked(bool) // Base IsClicked() bool // Base SetEnabled(bool) // Base IsEnabled() bool // Base SetError(bool) // Base IsError() bool // Base SetPosition(int32, int32) bool // Base SetPositionRel(int32, int32) bool // Base GetPosition() (int32, int32) // Base SetSize(int32, int32) bool // Base GetSize() (int32, int32) // Base GetForeground() *sdl.Color // Base GetBackground() *sdl.Color // Base GetBorderColour() *sdl.Color // Base SetForeground(*sdl.Color) // Base SetBackground(*sdl.Color) // Base SetBorderColour(*sdl.Color) // Base SetDrawBackground(bool) // Base ShouldDrawBackground() bool // Base SetDrawBorder(bool) // Base ShouldDrawBorder() bool // Base Destroy() // Base SetLog(func(LOG_LEVEL, string)) Log(LOG_LEVEL, string) CanLog() bool CanFocus() bool KeyPress(c int, ctrl, down bool) bool SetFocused(bool) // Base IsFocused() bool // Base GetFocusColour() *sdl.Color // Base SetFocusColour(*sdl.Color) // Base String() string }
type SDL_WidgetBase ¶
type SDL_WidgetBase struct {
// contains filtered or unexported fields
}
func (*SDL_WidgetBase) CanFocus ¶
func (b *SDL_WidgetBase) CanFocus() bool
func (*SDL_WidgetBase) CanLog ¶
func (b *SDL_WidgetBase) CanLog() bool
func (*SDL_WidgetBase) Click ¶
func (b *SDL_WidgetBase) Click(md *SDL_MouseData) bool
func (*SDL_WidgetBase) Destroy ¶
func (b *SDL_WidgetBase) Destroy()
func (*SDL_WidgetBase) GetBackground ¶
func (b *SDL_WidgetBase) GetBackground() *sdl.Color
func (*SDL_WidgetBase) GetBorderColour ¶
func (b *SDL_WidgetBase) GetBorderColour() *sdl.Color
func (*SDL_WidgetBase) GetDebounce ¶
func (b *SDL_WidgetBase) GetDebounce() int
func (*SDL_WidgetBase) GetFocusColour ¶
func (b *SDL_WidgetBase) GetFocusColour() *sdl.Color
func (*SDL_WidgetBase) GetForeground ¶
func (b *SDL_WidgetBase) GetForeground() *sdl.Color
func (*SDL_WidgetBase) GetPosition ¶
func (b *SDL_WidgetBase) GetPosition() (int32, int32)
func (*SDL_WidgetBase) GetRect ¶
func (b *SDL_WidgetBase) GetRect() *sdl.Rect
func (*SDL_WidgetBase) GetSize ¶
func (b *SDL_WidgetBase) GetSize() (int32, int32)
func (*SDL_WidgetBase) GetWidgetId ¶
func (b *SDL_WidgetBase) GetWidgetId() int32
func (*SDL_WidgetBase) Inside ¶
func (b *SDL_WidgetBase) Inside(x, y int32) (SDL_Widget, bool)
func (*SDL_WidgetBase) IsClicked ¶
func (b *SDL_WidgetBase) IsClicked() bool
func (*SDL_WidgetBase) IsEnabled ¶
func (b *SDL_WidgetBase) IsEnabled() bool
func (*SDL_WidgetBase) IsError ¶
func (b *SDL_WidgetBase) IsError() bool
func (*SDL_WidgetBase) IsFocused ¶
func (b *SDL_WidgetBase) IsFocused() bool
func (*SDL_WidgetBase) IsVisible ¶
func (b *SDL_WidgetBase) IsVisible() bool
func (*SDL_WidgetBase) KeyPress ¶
func (b *SDL_WidgetBase) KeyPress(c int, ctrl bool, down bool) bool
func (*SDL_WidgetBase) Log ¶
func (b *SDL_WidgetBase) Log(id LOG_LEVEL, s string)
func (*SDL_WidgetBase) Scale ¶
func (b *SDL_WidgetBase) Scale(s float32)
func (*SDL_WidgetBase) SetBackground ¶
func (b *SDL_WidgetBase) SetBackground(c *sdl.Color)
func (*SDL_WidgetBase) SetBorderColour ¶
func (b *SDL_WidgetBase) SetBorderColour(c *sdl.Color)
func (*SDL_WidgetBase) SetClicked ¶
func (b *SDL_WidgetBase) SetClicked(v bool)
func (*SDL_WidgetBase) SetDeBounce ¶
func (b *SDL_WidgetBase) SetDeBounce(db int)
func (*SDL_WidgetBase) SetDrawBackground ¶
func (b *SDL_WidgetBase) SetDrawBackground(e bool)
func (*SDL_WidgetBase) SetDrawBorder ¶
func (b *SDL_WidgetBase) SetDrawBorder(e bool)
func (*SDL_WidgetBase) SetEnabled ¶
func (b *SDL_WidgetBase) SetEnabled(e bool)
func (*SDL_WidgetBase) SetError ¶
func (b *SDL_WidgetBase) SetError(v bool)
func (*SDL_WidgetBase) SetFocusColour ¶
func (b *SDL_WidgetBase) SetFocusColour(c *sdl.Color)
func (*SDL_WidgetBase) SetFocused ¶
func (b *SDL_WidgetBase) SetFocused(v bool)
func (*SDL_WidgetBase) SetForeground ¶
func (b *SDL_WidgetBase) SetForeground(c *sdl.Color)
func (*SDL_WidgetBase) SetLog ¶
func (b *SDL_WidgetBase) SetLog(f func(LOG_LEVEL, string))
func (*SDL_WidgetBase) SetOnClick ¶
func (*SDL_WidgetBase) SetPosition ¶
func (b *SDL_WidgetBase) SetPosition(x, y int32) bool
func (*SDL_WidgetBase) SetPositionRel ¶
func (b *SDL_WidgetBase) SetPositionRel(x, y int32) bool
func (*SDL_WidgetBase) SetRect ¶
func (b *SDL_WidgetBase) SetRect(r *sdl.Rect)
func (*SDL_WidgetBase) SetSize ¶
func (b *SDL_WidgetBase) SetSize(w, h int32) bool
func (*SDL_WidgetBase) SetVisible ¶
func (b *SDL_WidgetBase) SetVisible(v bool)
func (*SDL_WidgetBase) SetWidgetId ¶
func (b *SDL_WidgetBase) SetWidgetId(widgetId int32)
func (*SDL_WidgetBase) ShouldDrawBackground ¶
func (b *SDL_WidgetBase) ShouldDrawBackground() bool
func (*SDL_WidgetBase) ShouldDrawBorder ¶
func (b *SDL_WidgetBase) ShouldDrawBorder() bool
func (*SDL_WidgetBase) String ¶
func (b *SDL_WidgetBase) String() string
type SDL_WidgetGroup ¶
type SDL_WidgetGroup struct {
// contains filtered or unexported fields
}
*************************************************************************************** * Container for SDL_Widgets. A list of lists *
func NewWidgetGroup ¶
func NewWidgetGroup(font *ttf.Font) *SDL_WidgetGroup
func (*SDL_WidgetGroup) AllSubGroups ¶
func (wg *SDL_WidgetGroup) AllSubGroups() []*SDL_WidgetSubGroup
func (*SDL_WidgetGroup) AllWidgets ¶
func (wg *SDL_WidgetGroup) AllWidgets() []SDL_Widget
func (*SDL_WidgetGroup) ClearFocus ¶
func (wg *SDL_WidgetGroup) ClearFocus()
func (*SDL_WidgetGroup) ClearSelection ¶
func (wg *SDL_WidgetGroup) ClearSelection()
func (*SDL_WidgetGroup) Destroy ¶
func (wg *SDL_WidgetGroup) Destroy()
func (*SDL_WidgetGroup) Draw ¶
func (wg *SDL_WidgetGroup) Draw(renderer *sdl.Renderer)
func (*SDL_WidgetGroup) GetFocusedWidget ¶
func (wg *SDL_WidgetGroup) GetFocusedWidget() SDL_Widget
func (*SDL_WidgetGroup) GetWidgetSubGroup ¶
func (wl *SDL_WidgetGroup) GetWidgetSubGroup(id int32) *SDL_WidgetSubGroup
func (*SDL_WidgetGroup) GetWidgetWithId ¶
func (wl *SDL_WidgetGroup) GetWidgetWithId(id int32) SDL_Widget
func (*SDL_WidgetGroup) InsideWidget ¶
func (wg *SDL_WidgetGroup) InsideWidget(x, y int32) SDL_Widget
func (*SDL_WidgetGroup) NewWidgetSubGroup ¶
func (wg *SDL_WidgetGroup) NewWidgetSubGroup(x, y, w, h, id int32, style STATE_BITS) *SDL_WidgetSubGroup
func (*SDL_WidgetGroup) NextFrame ¶
func (wg *SDL_WidgetGroup) NextFrame()
func (*SDL_WidgetGroup) Scale ¶
func (wg *SDL_WidgetGroup) Scale(s float32)
func (*SDL_WidgetGroup) SetFocusedId ¶
func (wg *SDL_WidgetGroup) SetFocusedId(id int32)
type SDL_WidgetSubGroup ¶
type SDL_WidgetSubGroup struct { SDL_WidgetBase // contains filtered or unexported fields }
*************************************************************************************** * Container for SDL_Widget instances. *
func NewWidgetSubGroup ¶
func NewWidgetSubGroup(x, y, w, h, id int32, font *ttf.Font, style STATE_BITS) *SDL_WidgetSubGroup
func (*SDL_WidgetSubGroup) Add ¶
func (wl *SDL_WidgetSubGroup) Add(widget SDL_Widget) SDL_Widget
func (*SDL_WidgetSubGroup) ArrangeGrid ¶
func (*SDL_WidgetSubGroup) ArrangeLR ¶
func (wl *SDL_WidgetSubGroup) ArrangeLR(xx, yy, padding int32) (int32, int32)
func (*SDL_WidgetSubGroup) ArrangeRL ¶
func (wl *SDL_WidgetSubGroup) ArrangeRL(xx, yy, padding int32) (int32, int32)
func (*SDL_WidgetSubGroup) ClearFocus ¶
func (wl *SDL_WidgetSubGroup) ClearFocus()
func (*SDL_WidgetSubGroup) ClearSelection ¶
func (wl *SDL_WidgetSubGroup) ClearSelection()
func (*SDL_WidgetSubGroup) Click ¶
func (wl *SDL_WidgetSubGroup) Click(md *SDL_MouseData) bool
func (*SDL_WidgetSubGroup) Destroy ¶
func (wl *SDL_WidgetSubGroup) Destroy()
func (*SDL_WidgetSubGroup) GetFocusedWidget ¶
func (wl *SDL_WidgetSubGroup) GetFocusedWidget() SDL_Widget
func (*SDL_WidgetSubGroup) GetFont ¶
func (wl *SDL_WidgetSubGroup) GetFont() *ttf.Font
func (*SDL_WidgetSubGroup) GetSmallestRect ¶
func (wl *SDL_WidgetSubGroup) GetSmallestRect(within *sdl.Rect) *sdl.Rect
func (*SDL_WidgetSubGroup) GetWidgetWithId ¶
func (wl *SDL_WidgetSubGroup) GetWidgetWithId(id int32) SDL_Widget
func (*SDL_WidgetSubGroup) Inside ¶
func (wl *SDL_WidgetSubGroup) Inside(x, y int32) (SDL_Widget, bool)
func (*SDL_WidgetSubGroup) KeyPress ¶
func (wl *SDL_WidgetSubGroup) KeyPress(c int, ctrl, down bool) bool
func (*SDL_WidgetSubGroup) ListWidgets ¶
func (wl *SDL_WidgetSubGroup) ListWidgets() []SDL_Widget
func (*SDL_WidgetSubGroup) NextFrame ¶
func (wl *SDL_WidgetSubGroup) NextFrame()
func (*SDL_WidgetSubGroup) Scale ¶
func (wl *SDL_WidgetSubGroup) Scale(s float32)
func (*SDL_WidgetSubGroup) SetFocusedId ¶
func (wl *SDL_WidgetSubGroup) SetFocusedId(id int32)
func (*SDL_WidgetSubGroup) SetFont ¶
func (wl *SDL_WidgetSubGroup) SetFont(font *ttf.Font)
------------------------------------------------------------ Sub Group Specific (not part of SDL_Widget interface) ------------------------------------------------------------
func (*SDL_WidgetSubGroup) SetPosition ¶
func (wl *SDL_WidgetSubGroup) SetPosition(x, y int32) bool
func (*SDL_WidgetSubGroup) SetPositionRel ¶
func (wl *SDL_WidgetSubGroup) SetPositionRel(x, y int32) bool
type STATE_BITS ¶
type STATE_BITS uint16
type STATE_COLOUR ¶
type STATE_COLOUR int
type STYLE_COLOUR ¶
type STYLE_COLOUR int