Class Toolbar
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The Toolbar is a widget that displays a list of items inside a box.
C#Copypublic class Toolbar : Widget, IAccessibleObject
- Inheritance
- Implements
Constructors
Declaration
C#Copypublic Toolbar(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | A EvasObject to which the new Table instance will be attached. |
Properties
Declaration
C#Copypublic ToolbarItem FirstItem { get; }
Property Value
Type | Description |
---|---|
ToolbarItem |
Declaration
C#Copypublic bool Homogeneous { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
True for homogeneous, False for no homogeneous.
IconLookupOrder
Sets or gets the icon lookup order, for toolbar items' icons. The default lookup order is ToolbarIocnLookupOrder.ThemeFreedesktop. Icons added before calling this function will not be affected.
Declaration
C#Copypublic ToolbarIconLookupOrder IconLookupOrder { get; set; }
Property Value
Type | Description |
---|---|
ToolbarIconLookupOrder |
IconSize
Sets or gets the icon size of a given toolbar widget. Default value is 32 pixels, to be used by toolbar items.
Declaration
C#Copypublic int IconSize { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic double ItemAlignment { get; set; }
Property Value
Type | Description |
---|---|
double |
Remarks
The toolbar items alignment, a float between 0.0 and 1.0.
Declaration
C#Copypublic int ItemsCount { get; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic ToolbarItem LastItem { get; }
Property Value
Type | Description |
---|---|
ToolbarItem |
Declaration
C#Copypublic ToolbarItem SelectedItem { get; }
Property Value
Type | Description |
---|---|
ToolbarItem |
Declaration
C#Copypublic ToolbarSelectionMode SelectionMode { get; set; }
Property Value
Type | Description |
---|---|
ToolbarSelectionMode |
Declaration
C#Copypublic ToolbarShrinkMode ShrinkMode { get; set; }
Property Value
Type | Description |
---|---|
ToolbarShrinkMode |
TransverseExpansion
Sets or gets the item's transverse expansion of a given Toolbar widget.
Declaration
C#Copypublic bool TransverseExpansion { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
The transverse expansion of the item, true for on and false for off. By default it's false.
Methods
Append(string, string)
Appends the ToolbarItem, which contains label and icon to the toolbar.
Declaration
C#Copypublic ToolbarItem Append(string label, string icon)
Parameters
Type | Name | Description |
---|---|---|
string | label | The label of the item. |
string | icon | A string with the icon name or the absolute path of an image file. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is appended to the toolbar. |
Declaration
C#Copypublic ToolbarItem Append(string label)
Parameters
Type | Name | Description |
---|---|---|
string | label | The label of the item. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is appended to the toolbar. |
Declaration
C#Copyprotected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
System.IntPtr | Handle IntPtr. |
Overrides
Declaration
C#Copypublic ToolbarItem FindItemByLabel(string label)
Parameters
Type | Name | Description |
---|---|---|
string | label | The label of the item. |
Returns
Type | Description |
---|---|
ToolbarItem | The ToolbarItem into the toolbar. |
InsertAfter(ToolbarItem, string, string)
Inserts a new item which contains label and icon into the toolbar object after item after
.
Declaration
C#Copypublic ToolbarItem InsertAfter(ToolbarItem after, string label, string icon)
Parameters
Type | Name | Description |
---|---|---|
ToolbarItem | after | The toolbar item to insert after. |
string | label | The label of the item. |
string | icon | A string with the icon name or the absolute path of an image file. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is inserted into the toolbar. |
InsertBefore(ToolbarItem, string, string)
Inserts a new item which contains label and icon into the toolbar object before item before
.
Declaration
C#Copypublic ToolbarItem InsertBefore(ToolbarItem before, string label, string icon)
Parameters
Type | Name | Description |
---|---|---|
ToolbarItem | before | The toolbar item to insert before. |
string | label | The label of the item. |
string | icon | A string with the icon name or the absolute path of an image file. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is inserted into the toolbar. |
See Also
InsertBefore(ToolbarItem, string)
Inserts a new item which just contains label into the toolbar object before item before
.
Declaration
C#Copypublic ToolbarItem InsertBefore(ToolbarItem before, string label)
Parameters
Type | Name | Description |
---|---|---|
ToolbarItem | before | The toolbar item to insert before. |
string | label | The label of the item. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is inserted into the toolbar. |
Prepend(string, string)
Prepends the ToolbarItem, which contains label and icon to the toolbar.
Declaration
C#Copypublic ToolbarItem Prepend(string label, string icon)
Parameters
Type | Name | Description |
---|---|---|
string | label | The label of the item. |
string | icon | A string with the icon name or the absolute path of an image file. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is prepended to the toolbar. |
Declaration
C#Copypublic ToolbarItem Prepend(string label)
Parameters
Type | Name | Description |
---|---|---|
string | label | The label of the item. |
Returns
Type | Description |
---|---|
ToolbarItem | The new ToolbarItem which is prepended to the toolbar. |
Events
Declaration
C#Copypublic event EventHandler<ToolbarItemEventArgs> Selected
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><ToolbarItemEventArgs> |