[][src]Module orbtk::prelude

Re-exports

pub use crate::proc_macros::*;

Modules

behaviors

Behavior widgets are provides a default set of event actions like mouse event handling. Use them as child to expand the event behavior of your widget.

colors

provides constants to reference colors.

concurrent
fonts

provides constants associated to fonts.

material_icons_font

Icons in the Material Icons Font family are accessible via their unique codepoints, representing the glyph. The codepoints are mapped to this given constants.

platform
prelude
utils

Macros

Debug

Derive macro generating an impl of the trait Debug.

into_property_source
trigger_event
widget

Defines a new type of Widget with its properties and event handlers. Widgets defined by this macro can be instantiated by calling the new() method. Inherits default properties from a base widget. Implements the Widget trait automatically. Also the struct serves as a builder of the builder pattern.

Structs

AbsoluteLayout

Place widgets absolute on the screen.

ActivateEvent
ActivateEventHandler
Application

The Application represents the entry point of an OrbTk based application.

AttachedProperty

Used ot generate attached properties.

Border

Describes a border of a shape with border brush, thickness and radius.

BorderBuilder

Used to build a border, specifying additional details.

BuildContext

Used to create an entity for a widget with its properties as components.

Button

The Button widget can be clicked by user. It's used to perform an action.

ButtonCtx

Represents a widget context that provides methods to access the properties of a widget.

Canvas

Canvas is used to render 3D graphics.

CanvasCtx

Represents a widget context that provides methods to access the properties of a widget.

ChangedEvent

This event occurs when a property of a widget is updated.

ChangedEventHandler
CheckBox

The CheckBox widget can be switch its selected state. It contains a selection box and a text.

CheckBoxCtx

Represents a widget context that provides methods to access the properties of a widget.

CleanupSystem

Handles the inner cleanup while window is closing.

ClickEvent

ClickEvent occurs when a user clicked on an element.

ClickEventHandler

Used to handle click events. Could be attached to a widget.

Color

A r g b a color.

Column

Used to define the column of the Grid.

ColumnBuilder

Used to build a column, specifying additional details.

Columns

Helper struct used inside of the columns Property.

ColumnsBuilder

Used to build a columns, specifying additional details.

ComboBox

The ComboBox represents an selection widget with a drop-down list.

ComboBoxCtx

Represents a widget context that provides methods to access the properties of a widget.

ComboBoxItem

The ComboBoxItem describes an item inside of a ComboBox.

ComboBoxItemCtx

Represents a widget context that provides methods to access the properties of a widget.

ComboBoxItemState

The ComboBoxItemState handles the interaction an selection of a ComboBoxItem.

ComboBoxState

The ComboBoxState is used to manipulate the position of the thumb of the slider widget.

ComponentBox

This struct is used to store a component with its type id. Used for dynamic component adding.

ComponentBuilder

The TypeComponentBuilder is used to build a set of type key based components.

ComponentStore

The TypeComponentStore stores the components of all entities. It could be used to borrow the components of the entities.

Constraint

Constraint describes a box constraint.

ConstraintBuilder

Used to build a constraint, specifying additional details.

Container

The Container layout widget surrounds its child with a padding. Draws a box around the child.

ContainerCtx

Represents a widget context that provides methods to access the properties of a widget.

Context

The Context is provides access for the states to objects they could work with.

ContextProvider

Temporary solution to share dependencies. Will be refactored soon.

Cursor

The Cursor widget represents a text cursor used to mark text.

CursorCtx

Represents a widget context that provides methods to access the properties of a widget.

CursorState
DefaultRenderObject
DefaultRenderPipeline

RenderPipeline object.

DirtySize

Size with width, height and dirty flag.

Entity

Represents an entity.

EntityBuilder

The entity builder is used to create an entity with components.

EntityComponentManager

The EntityComponentManager represents the main entity and component storage.

EntityStore

VecEntityStore is the default vector based implementation of an entity store.

EventBox

Internal wrapper for an event, including the strategy and source entity.

EventQueue

The EventQueue is used to register and read new events.

EventQueueIterator
EventStateSystem

The EventStateSystem pops events from the event queue and delegates the events to the corresponding event handlers of the widgets and updates the states.

FixedSizeLayout

Fixed size layout is defined by fixed bounds like the size of an image or the size of a text.

FocusEventHandler
Font
FontConfig
FontIconBlock

The FontIconBlock widget is used to draw text. It is not interactive.

FontIconBlockCtx

Represents a widget context that provides methods to access the properties of a widget.

FontIconRenderObject
Global

The Global struct is used to define global properties that could be access application width.

GlobalMouseUpEvent

GlobalMouseUpEvent occurs when a mouse button is released.

GlobalMouseUpEventHandler

Defines an event handler for a global mouse up event. Global mouse up events could not be handled.

Grid

The Grid defines a flexible grid area that consists of columns and rows.

GridCtx

Represents a widget context that provides methods to access the properties of a widget.

GridLayout

Orders its children in a grid layout with columns and rows. If no columns and rows are defined the grid layout could also be used as an alignment layout.

HashMap

A hash map implemented with quadratic probing and SIMD lookup.

HashSet

A hash set implemented as a HashMap where the value is ().

Image
ImageRenderObject

Used to render an image.

ImageWidget

The ImageWidget widget is used to draw an image. It is not interactive.

ImageWidgetCtx

Represents a widget context that provides methods to access the properties of a widget.

InitSystem

This system is used to initializes the widgets.

ItemsWidget

The ItemsWidget is a simple no interactive items drawer widget.

ItemsWidgetCtx

Represents a widget context that provides methods to access the properties of a widget.

ItemsWidgetState
KeyDownEvent
KeyDownEventHandler

Used to handle key down events. Could be attached to a widget.

KeyUpEvent
KeyboardState

Contains the state information for the keyboard.

LayoutSystem

The LayoutSystem builds per iteration the layout of the current ui. The layout parts are calculated by the layout objects of layout widgets.

LinearGradientStop

Describes a position on a colorful gradient.

ListView

The ListView is an items drawer widget with selectable items.

ListViewCtx

Represents a widget context that provides methods to access the properties of a widget.

ListViewItem

The ListViewItem describes an item inside of a ListView.

ListViewItemCtx

Represents a widget context that provides methods to access the properties of a widget.

ListViewItemState

The ListViewItemState handles the interaction and selection of a ListViewItem.

ListViewState

The ListViewState generates the list box items and handles the selected indices.

Mouse

Represents the current mouse state of an mouse event.

MouseDownEvent

MouseDownEvent occurs when a mouse button is pressed.

MouseDownEventHandler

Used to handle mouse down events. Could be attached to a widget.

MouseMoveEvent

MouseMoveEvent indicates if the mouse position is changed on the window.

MouseMoveEventHandler

Used to handle mouse down events. Could be attached to a widget.

MouseUpEvent

MouseUpEvent occurs when a mouse button is released.

MouseUpEventHandler

Used to handle mouse down events. Could be attached to a widget.

NumericBox

NumericBox is used to let the user increase or decrease the value of the input by a given, fixed value called step until it reaches the upper or lower bounds. The widget can be controlled by clicking on the two control buttons, or the keybaord's Up and Down, Numpad+ and Numpad- keys, or the mouse scroll. Note: after the widget is initialized, changing the min, max or step properties has no effect.

NumericBoxCtx

Represents a widget context that provides methods to access the properties of a widget.

NumericBoxState
Overlay

The Overlay is used to draw its children on the top of all other widgets in the tree.

OverlayCtx

Represents a widget context that provides methods to access the properties of a widget.

PaddingLayout

Add padding to the widget.

PhantomContext

Default type if you don't want to use a context.

PipelineRenderObject
Point

A Point is specified by a x coordinate and an y coordinate.

Popup

The Popup is used to display content that floats over the main content.

PopupCtx

Represents a widget context that provides methods to access the properties of a widget.

PopupLayout

Add padding to the widget.

PopupState

The PopupState handles the open and close behavior of the Popup widget.

PostLayoutStateSystem

The PostLayoutStateSystem calls the update_post_layout methods of widget states.

ProgressBar

The ProgressBar widget is used to indicating a finite progress (e.g. copying a file, downloading a video from the internet). A progress is visually represented as a horizontal bar which grows when the progress advances. The ProgressBar expects values between 0.0 and 1.0, whereas 0.0 means 0%, and 1.0 means 100%. Any value outside of this range considered as 100%.

ProgressBarCtx

Represents a widget context that provides methods to access the properties of a widget.

Rc

A single-threaded reference-counting pointer. 'Rc' stands for 'Reference Counted'.

Rectangle

A Rectangle is normally expressed as a top-left corner and a size

RectangleRenderObject
RefCell

A mutable memory location with dynamically checked borrow rules

Registry

The struct Registry represents a global registry. It is used to register and call global elements like services.

RenderConfig

Defines the current configuration of the render ctx.

RenderContext2D

The RenderContext2D provides a concurrent render ctx.

RenderSystem

The RenderSystem iterates over all visual widgets and used its render objects to draw them on the screen.

RenderTarget
Row

Used to define the row of the Grid.

RowBuilder

Used to build a row, specifying additional details.

Rows

Helper struct used inside of the row Property.

RowsBuilder
ScrollBar

The ScrollBar widget represents a position inside of a scroll container.

ScrollBarCtx

Represents a widget context that provides methods to access the properties of a widget.

ScrollEvent

ScrollEvent occurs when the mouse wheel is moved.

ScrollEventHandler

Used to handle scroll events. Could be attached to a widget.

ScrollIndicator

The ScrollIndicator widget contains two scroll bars.

ScrollIndicatorCtx

Represents a widget context that provides methods to access the properties of a widget.

ScrollIndicatorState

The ScrollIndicatorState handles the ScrollIndicator widget.

ScrollViewer

The ScrollViewer is used to scroll its child vertical and or horizontal. Only the first child of the scroll viewer can be scrolled.

ScrollViewerCtx

Represents a widget context that provides methods to access the properties of a widget.

ScrollViewerMode

ScrollViewerMode describes the vertical and horizontal scroll behavior of the ScrollViewer.

ScrollViewerState

The ScrollViewerState handles the ScrollViewer widget.

SelectedEntities

SelectedEntities describes a list of selected entities.

SelectedIndices

SelectedIndices describes a list of selected indices.

SelectionChangedEvent
SelectionChangedEventHandler
Selector

The selector is used to read a property value from the Theme.

Settings

Settings represents a global settings service that could be use to serialize and deserialize data in the ron file format. Settings are stored in the user settings directory (depending on the operating system) under the a folder with the given application name.

SharedComponentBox

This struct is used to store a shared component with its type id. Used for dynamic component adding.

Size

A Size specified by width and height.

Slider

The Slider allows to use a val in a range of values.

SliderCtx

Represents a widget context that provides methods to access the properties of a widget.

SliderState

The SliderState is used to manipulate the position of the thumb of the slider widget.

Stack

The Stack defines a layout that is used to stack its children vertical or horizontal.

StackCtx

Represents a widget context that provides methods to access the properties of a widget.

StackLayout

Stacks visual the children widgets vertical or horizontal.

StatesContext

The StatesContext provides access to the widget states.

String16

A UTF-16 encoded, growable string.

StringComponentBuilder

The StringComponentBuilder is used to build a set of string key based components.

StringComponentStore

The StringComponentStore stores the components of entities and uses strings as component keys. It could be used to borrow the components of the entities.

Style
Switch

The Switch widget can be switch between on and off.

SwitchCtx

Represents a widget context that provides methods to access the properties of a widget.

SwitchState

State to handle the position of switch toggle.

TabHeader

The TabHeader widget is used internally to managed tabs headers. Not meant for other uses.

TabHeaderCtx

Represents a widget context that provides methods to access the properties of a widget.

TabHeaderState

The TabHeaderState is used to store some callbacks that will be applied during template function. Once the template function is called, they are no more used.

TabWidget

The TabWidget widget can store and control multiple tabs with arbitrary content. Only the selected tab will show it's content.

TabWidgetCtx

Represents a widget context that provides methods to access the properties of a widget.

TabWidgetState

Through the TabWidgetState it is possible to control the behaviour of TabWidget. Nearly every called function on TabWidgetState will not be executed immediatly, but they are instead stored and executed during the update phase, in the same order they are submitted.

TextBlock

The TextBlock widget is used to draw text. It is not interactive.

TextBlockCtx

Represents a widget context that provides methods to access the properties of a widget.

TextBox

The TextBox widget represents a single line text input widget.

TextBoxCtx

Represents a widget context that provides methods to access the properties of a widget.

TextMetrics

The TextMetrics struct represents the dimension of a text.

TextRenderObject

Used to render a text.

TextSelection

Is used to mark the selection of a text.

TextSelectionLayout

The text selection layout is used to measure and arrange a text selection cursor.

Theme
Thickness

Used to describes a thickness e.g a border thickness.

ToggleButton

The ToggleButton widget can be clicked by user and could switch between selected / not selected. It's used to perform an action.

ToggleButtonCtx

Represents a widget context that provides methods to access the properties of a widget.

Tree

Base data structure to manage the entities of a window in a tree based structure.

TreeIterator

Used to create an iterator for the tree.

TypeId

A TypeId represents a globally unique identifier for a type.

Value

Wraps a ron value and is used to support conversion to different types.

WidgetContainer

The WidgetContainer wraps the entity of a widget and provides access to its properties, its children properties and its parent properties.

Window

The Window widget provides access to the properties of an application window. It also contains global properties like keyboard modifier and focused widget.

WindowAdapter

Represents a window. Each window has its own tree, event pipeline and shell.

WindowCtx

Represents a widget context that provides methods to access the properties of a widget.

WindowEventHandler
World

The World struct represents the main interface of the library. It used as storage of entities, components and systems.

Enums

Alignment

Used to align a widget vertical or horizontal.

Brush

A Brushdescribes how a shape is filled or stroked.

ColumnWidth

Used to define the width of a grid column.

EventError
EventStrategy

Defines the strategy of an event how it moves through the tree.

Filter

Used to filter stuff such as the on_changed callback.

FocusEvent

Used to request keyboard focus on the window.

InputAction
NotFound

Not found error.

NotFound

Used as return type if a requested entity is not found on the tree.

Orientation

Is used to control the orientation of the Stack.

ParentType

Used to define the parent_typeof a widget.

PropertySource

Use to build a property or to share it.

RowHeight

Used to define the height of a grid row.

ScrollMode

The ScrollMode defines the mode of a scroll direction.

SelectionMode

Represents a selection mode.

SystemEvent
TextAlignment

Used to align a text.

TextBaseline

Text baseline being used when drawing text

Visibility

Is used to control the visibility of a widget

WindowEvent

Statics

ID_INPUT
STYLE_BTN
STYLE_INPUT
STYLE_PROGRESS_BAR
STYLE_PROGRESS_BAR_INDICATOR
STYLE_SCROLL_BAR
STYLE_SLIDER
STYLE_TEXT_BOX
STYLE_WINDOW

Traits

ActivateHandler
Any

A trait to emulate dynamic typing.

AsAny
Bordered

Contains a set of getters and setters to read and write to a border.

ChangedHandler
Component

This trait is used to internal handle all components types. This trait is implicitly implemented for all other types.

Debug

? formatting.

Event

Used to define an event.

EventHandler

This trait is used to define an event handler.

IntoPropertySource

Used to convert components / properties into a PropertySource object.

KeyDownHandler
Layout

A layout is used to dynamic order the children of a widget.

MouseHandler
PipelineTrait

Used to implement a custom render pipeline.

RenderObject
RenderPipeline
SelectionChangedHandler
State

Used to define a state of a widget.

System

This trait is used to interact with the components of entities. It could read and write to the components.

Template

The Template trait defines the template of a particular type of a widget.

Widget

The Widget trait is used to define a new widget.

Functions

button

Gets a context wrapper to access the properties of the widget.

canvas

Gets a context wrapper to access the properties of the widget.

check_box

Gets a context wrapper to access the properties of the widget.

check_mouse_condition

Checks if the given point is inside of a widget.

combo_box

Gets a context wrapper to access the properties of the widget.

combo_box_item

Gets a context wrapper to access the properties of the widget.

container

Gets a context wrapper to access the properties of the widget.

create_window

Creates a WindowAdapter and a WindowSettings object from a window builder closure.

cursor

Gets a context wrapper to access the properties of the widget.

dark_theme

Creates OrbTks default dark theme.

find_parent

Finds th parent of the target_child. The parent of the target_child must be the given parent or a child of the given parent.

font_icon_block

Gets a context wrapper to access the properties of the widget.

get_all_children
get_property

Get the property of a widget.

get_property_or_value

Returns the value of a property of a widget if it exists otherwise the given value.

grid

Gets a context wrapper to access the properties of the widget.

image_widget

Gets a context wrapper to access the properties of the widget.

items_widget

Gets a context wrapper to access the properties of the widget.

light_theme

Creates OrbTks default light theme.

list_view

Gets a context wrapper to access the properties of the widget.

list_view_item

Gets a context wrapper to access the properties of the widget.

mark_as_dirty

Mark the widget and shared widgets as dirty.

numeric_box

Gets a context wrapper to access the properties of the widget.

overlay

Gets a context wrapper to access the properties of the widget.

popup

Gets a context wrapper to access the properties of the widget.

print_tree
progress_bar

Gets a context wrapper to access the properties of the widget.

register_property
scroll_bar

Gets a context wrapper to access the properties of the widget.

scroll_indicator

Gets a context wrapper to access the properties of the widget.

scroll_viewer

Gets a context wrapper to access the properties of the widget.

slider

Gets a context wrapper to access the properties of the widget.

stack

Gets a context wrapper to access the properties of the widget.

switch

Gets a context wrapper to access the properties of the widget.

tab_header

Gets a context wrapper to access the properties of the widget.

tab_widget

Gets a context wrapper to access the properties of the widget.

text_block

Gets a context wrapper to access the properties of the widget.

text_box

Gets a context wrapper to access the properties of the widget.

toggle_button

Gets a context wrapper to access the properties of the widget.

toggle_flag

Toggles the selector state`.

window

Gets a context wrapper to access the properties of the widget.

Type Definitions

ChangedHandlerFn

Used to define a property changed callback.

EventHandlerMap
FocusHandlerFn
GlobalMouseHandlerFunction

Defines the global bouse handler function.

KeyHandler
MouseHandlerFunction

Defines the mouse handler function.

PositionHandlerFunction
Priority

The run order of a system. The systems will be executed by priority from small to great.

TriggerHandler
WidgetBuildContext