0.44.0
|
#include <iWidgetGridLayout.h>
Inherits igor::iWidget.
Public Member Functions | |
iWidgetGridLayout (const iWidgetPtr parent=nullptr) | |
~iWidgetGridLayout ()=default | |
void | appendRows (uint32 count) |
void | appendColumns (uint32 count) |
void | insertRow (uint32 at) |
void | insertColumn (uint32 at) |
void | removeRow (uint32 at) |
void | removeColumn (uint32 at) |
void | clear () |
uint32 | getRowCount () |
uint32 | getColumnCount () |
int32 | getCellSpacing () |
void | setCellSpacing (int32 cellSpacing) |
int32 | getBorder () |
void | setBorder (int32 border) |
void | addWidget (iWidgetPtr widget) |
void | removeWidget (iWidgetPtr widget) |
void | addWidget (iWidgetPtr widget, int32 col, int32 row, const std::any &userData=std::any()) |
void | setSelectMode (iSelectionMode selectMode) |
void | setHighlightMode (iSelectionMode highlightMode) |
iSelectionMode | getSelectMode () const |
iSelectionMode | getHighlightMode () const |
void | select (int32 column, int32 row) |
void | unselect () |
bool | isSelected () |
int32 | getSelectedRow () const |
int32 | getSelectedColumn () const |
const std::any | getSelectedUserData () |
std::any | getUserData (int32 col, int32 row) |
void | setStretchRow (int32 row) |
int32 | getStretchRow () const |
void | setStretchColumn (int32 col) |
int32 | getStretchColumn () const |
int32 | getMouseOverRow () const |
int32 | getMouseOverColumn () const |
void | setEmptyCellsSelectable (bool emptyCellsSelectable=true) |
bool | getEmptyCellsSelectable () const |
bool | isCellEmpty (int32 col, int32 row) |
Public Member Functions inherited from igor::iWidget | |
iWidgetType | getWidgetType () const |
iWidgetKind | getWidgetKind () const |
void | setZValue (uint32 zvalue) |
uint32 | getZValue () const |
void | setBackground (const iaColor4f &color) |
const iaColor4f & | getBackground () const |
void | setForeground (const iaColor4f &color) |
const iaColor4f & | getForeground () const |
bool | isBlocked () const |
bool | hasKeyboardFocus () const |
iWidgetState | getState () const |
void | registerOnClickEvent (iClickDelegate clickDelegate) |
void | registerOnMouseOffClickEvent (iMouseOffClickDelegate clickDelegate) |
void | registerOnDoubleClickEvent (iDoubleClickDelegate doubleClickDelegate) |
void | registerOnMouseOverEvent (iMouseOverDelegate mouseOverDelegate) |
void | registerOnMouseOffEvent (iMouseOffDelegate mouseOffDelegate) |
void | registerOnChangeEvent (iChangeDelegate changeDelegate) |
void | registerOnFocusEvent (iFocusDelegate focusDelegate) |
void | registerOnWheelUpEvent (iWheelUpDelegate wheelUpDelegate) |
void | unregisterOnWheelUpEvent (iWheelUpDelegate wheelUpDelegate) |
void | registerOnWheelDownEvent (iWheelDownDelegate wheelDownDelegate) |
void | unregisterOnWheelDownEvent (iWheelDownDelegate wheelDownDelegate) |
void | unregisterOnClickEvent (iClickDelegate clickDelegate) |
void | unregisterOnMouseOffClickEvent (iMouseOffClickDelegate clickDelegate) |
void | unregisterOnDoubleClickEvent (iDoubleClickDelegate doubleClickDelegate) |
void | unregisterOnMouseOverEvent (iMouseOverDelegate mouseOverDelegate) |
void | unregisterOnMouseOffEvent (iMouseOffDelegate mouseOffDelegate) |
void | unregisterOnChangeEvent (iChangeDelegate changeDelegate) |
void | unregisterOnFocusEvent (iFocusDelegate focusDelegate) |
void | registerOnContextMenuEvent (iContextMenuDelegate contextMenuDelegate) |
void | unregisterOnContextMenuEvent (iContextMenuDelegate contextMenuDelegate) |
void | registerOnSelectionChangedEvent (iSelectionChangedDelegate delegate) |
void | unregisterOnSelectionChangedEvent (iSelectionChangedDelegate delegate) |
iaVector2f | getActualPos () const |
int32 | getActualPosX () const |
int32 | getActualPosY () const |
int32 | getActualWidth () const |
int32 | getActualHeight () const |
iaRectanglef | getActualRect () const |
int32 | getRelativePosX () const |
int32 | getRelativePosY () const |
int32 | getMinWidth () const |
int32 | getMinHeight () const |
int32 | getConfiguredMinWidth () const |
int32 | getConfiguredMinHeight () const |
void | setMinWidth (int32 width) |
void | setMinHeight (int32 height) |
void | setMinSize (int32 width, int32 height) |
void | setAcceptOutOfBoundsClicks (bool acceptOutOfBoundsClick=true) |
bool | getAcceptOutOfBoundsClicks () const |
iHorizontalAlignment | getHorizontalAlignment () const |
iVerticalAlignment | getVerticalAlignment () const |
void | setHorizontalAlignment (iHorizontalAlignment horizontalAlignment) |
void | setVerticalAlignment (iVerticalAlignment verticalAlignment) |
bool | isVisible () const |
bool | isEnabled () const |
void | setVisible (bool visible=true) |
void | setEnabled (bool enabled=true) |
iWidgetID | getID () const |
iWidgetID | getParentID () const |
iWidgetPtr | getParent () const |
bool | isMouseOver () |
void | setAcceptDrag (bool acceptDrag) |
bool | isAcceptingDrag () |
void | setAcceptDrop (bool acceptDrop) |
bool | isAcceptingDrop () |
bool | hasParent () const |
void | setGrowingByContent (bool grow=true) |
bool | isGrowingByContent () const |
iaString | getInfo () const |
void | setTooltip (const iaString &text) |
iaString | getTooltip () const |
const std::vector< iWidgetPtr > & | getChildren () const |
virtual void | clear () |
void | setIgnoreChildEventConsumption (bool value=true) |
bool | isIgnoringChildEventConsumption () const |
iWidgetPtr | getRoot () |
virtual void | blockEvents () |
virtual void | unblockEvents () |
void | setOverlayEnabled (bool overlay) |
bool | isOverlayEnabled () const |
virtual void | draw () |
virtual void | drawOverlay () |
virtual void | addWidget (iWidgetPtr widget) |
virtual void | removeWidget (iWidgetPtr widget) |
void | setCursor (iMouseCursorType cursorType) |
void | setUserData (const std::any &userData) |
std::any | getUserData () const |
void | setSelectable (bool selectable) |
bool | isSelectable () const |
void | setMultiSelection (bool enabled) |
bool | isMultiSelectionEnabled () const |
void | select () |
void | unselect () |
bool | isSelected () const |
void | clearSelection () |
const std::vector< iWidgetPtr > | getSelection () const |
void | setSelection (const std::vector< iWidgetPtr > &selection) |
Additional Inherited Members | |
Static Public Member Functions inherited from igor::iWidget | |
static iWidgetPtr | getKeyboardFocusWidget () |
Static Public Attributes inherited from igor::iWidget | |
static const iWidgetID | INVALID_WIDGET_ID = 0 |
Protected Member Functions inherited from igor::iWidget | |
void | clearChildren () |
void | updateMinSize (int32 width, int32 height) |
void | setParent (iWidgetPtr parent) |
void | setKeyboardFocus () |
void | resetKeyboardFocus () |
void | setClientArea (int32 left, int32 right, int32 top, int32 bottom) |
const iaVector2f & | getLastMousePos () const |
iWidget (iWidgetType type, iWidgetKind kind, const iWidgetPtr parent=nullptr) | |
virtual | ~iWidget () |
virtual bool | onEvent (iEvent &event) |
virtual bool | onMouseWheel (iEventMouseWheel &event) |
virtual bool | onMouseKeyDown (iEventMouseKeyDown &event) |
virtual bool | onMouseDoubleClick (iEventMouseKeyDoubleClick &event) |
virtual bool | onMouseKeyUp (iEventMouseKeyUp &event) |
virtual void | onMouseMove (iEventMouseMove &event) |
virtual bool | onASCII (iEventKeyASCII &event) |
virtual bool | onKeyDown (iEventKeyDown &event) |
virtual bool | onKeyUp (iEventKeyUp &event) |
virtual void | onLostKeyboardFocus () |
virtual void | onGainedKeyboardFocus () |
virtual void | calcMinSize () |
virtual void | updateAlignment (int32 clientWidth, int32 clientHeight) |
virtual void | calcChildOffsets (std::vector< iaRectanglef > &offsets) |
virtual void | onDragEnter (iDrag &drag) |
virtual void | onDragMove (iDrag &drag, const iaVector2f &mousePos) |
virtual void | onDragLeave (iDrag &drag) |
virtual void | onDrop (const iDrag &drag) |
virtual void | onDrag () |
Protected Attributes inherited from igor::iWidget | |
bool | _selected = false |
bool | _isSelectable = false |
bool | _isMultiSelectionEnabled = false |
std::vector< iWidgetPtr > | _children |
int32 | _configuredMinWidth = 0 |
int32 | _configuredMinHeight = 0 |
iClickEvent | _click |
iMouseOffClickEvent | _mouseOffClick |
iContextMenuEvent | _contextMenu |
iDoubleClickEvent | _doubleClick |
iMouseOverEvent | _mouseOver |
iMouseOffEvent | _mouseOff |
iChangeEvent | _change |
iFocusEvent | _focus |
iWheelUpEvent | _wheelUp |
iWheelDownEvent | _wheelDown |
iSelectionChangedEvent | _selectionChanged |
iaString | _tooltip |
iaVector2f | _tooltipPos |
iaTime | _tooltipTime = iaTime(0) |
bool | _initTooltip = false |
uint32 | _zValue = 0 |
bool | _reactOnMouseWheel = true |
bool | _blockedEvents = false |
bool | _acceptOutOfBoundsClicks = false |
bool | _acceptDrop = false |
bool | _acceptDrag = false |
bool | _isMouseOver = false |
bool | _ignoreChildEventConsumption = false |
iaVector2f | _lastMousePos |
iaVector2f | _lastMousePressPos |
grid layout widget
igor::iWidgetGridLayout::iWidgetGridLayout | ( | const iWidgetPtr | parent = nullptr | ) |
ctor initializes member variables
parent | optional parent |
|
default |
does nothing
|
virtual |
adds a child widget to this widget at position 0, 0
widget | the child widget to be added |
Reimplemented from igor::iWidget.
void igor::iWidgetGridLayout::addWidget | ( | iWidgetPtr | widget, |
int32 | col, | ||
int32 | row, | ||
const std::any & | userData = std::any() |
||
) |
add widget and set it at given position
widget | the widget pointer |
col | column index |
row | row index |
userData | any kind of data |
void igor::iWidgetGridLayout::appendColumns | ( | uint32 | count | ) |
appends columns on the right of the grid
count | the amount of columns to be added |
void igor::iWidgetGridLayout::appendRows | ( | uint32 | count | ) |
appends rows at the bottom of the grid
count | the amount of rows to be added |
|
virtual |
clears the whole grid
Reimplemented from igor::iWidget.
int32 igor::iWidgetGridLayout::getBorder | ( | ) |
int32 igor::iWidgetGridLayout::getCellSpacing | ( | ) |
uint32 igor::iWidgetGridLayout::getColumnCount | ( | ) |
bool igor::iWidgetGridLayout::getEmptyCellsSelectable | ( | ) | const |
iSelectionMode igor::iWidgetGridLayout::getHighlightMode | ( | ) | const |
int32 igor::iWidgetGridLayout::getMouseOverColumn | ( | ) | const |
int32 igor::iWidgetGridLayout::getMouseOverRow | ( | ) | const |
uint32 igor::iWidgetGridLayout::getRowCount | ( | ) |
int32 igor::iWidgetGridLayout::getSelectedColumn | ( | ) | const |
if not selected it will return -1
int32 igor::iWidgetGridLayout::getSelectedRow | ( | ) | const |
if not selected it will return -1
const std::any igor::iWidgetGridLayout::getSelectedUserData | ( | ) |
iSelectionMode igor::iWidgetGridLayout::getSelectMode | ( | ) | const |
int32 igor::iWidgetGridLayout::getStretchColumn | ( | ) | const |
int32 igor::iWidgetGridLayout::getStretchRow | ( | ) | const |
col | specfied column |
row | specfied row |
void igor::iWidgetGridLayout::insertColumn | ( | uint32 | at | ) |
insert a single column before given position
at | the given position |
void igor::iWidgetGridLayout::insertRow | ( | uint32 | at | ) |
insert a single row before given position
at | the given position |
col | the column of the cell |
row | the row of the cell |
bool igor::iWidgetGridLayout::isSelected | ( | ) |
void igor::iWidgetGridLayout::removeColumn | ( | uint32 | at | ) |
removed column at given position
at | the given position |
void igor::iWidgetGridLayout::removeRow | ( | uint32 | at | ) |
removes row at given position
at | the given position |
|
virtual |
removes a child widget from this widget regardless of it's position
the former position will be cleared
widget | the child widget to be removed |
Reimplemented from igor::iWidget.
void igor::iWidgetGridLayout::setBorder | ( | int32 | border | ) |
sets border
void igor::iWidgetGridLayout::setCellSpacing | ( | int32 | cellSpacing | ) |
sets cell spacing
void igor::iWidgetGridLayout::setEmptyCellsSelectable | ( | bool | emptyCellsSelectable = true | ) |
sets wether or not an empty cell is selectable
only active for iSelectionMode::Cell
emptyCellsSelectable | if true empty cells are selectable (default is false) |
void igor::iWidgetGridLayout::setHighlightMode | ( | iSelectionMode | highlightMode | ) |
sets highlight mode
highlightMode | the mode of highlight |
void igor::iWidgetGridLayout::setSelectMode | ( | iSelectionMode | selectMode | ) |
sets selection mode of grid
selectMode | the mode of selection |
void igor::iWidgetGridLayout::setStretchColumn | ( | int32 | col | ) |
defines which column will be stretched if the grid is horizontally stretched
col | column number to be stretched |
void igor::iWidgetGridLayout::setStretchRow | ( | int32 | row | ) |
defines which row will be stretched if the grid is vertically stretched
row | row number to be stretched |
void igor::iWidgetGridLayout::unselect | ( | ) |
unselects the grid