gi-handy-0.0.1: libhandy bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Handy.Objects.ComboRow

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype ComboRow Source #

Memory-managed wrapper type.

Constructors

ComboRow (ManagedPtr ComboRow) 
Instances
GObject ComboRow Source # 
Instance details

Defined in GI.Handy.Objects.ComboRow

Methods

gobjectType :: IO GType #

HasParentTypes ComboRow Source # 
Instance details

Defined in GI.Handy.Objects.ComboRow

type ParentTypes ComboRow Source # 
Instance details

Defined in GI.Handy.Objects.ComboRow

type ParentTypes ComboRow = ActionRow ': (ListBoxRow ': (Bin ': (Container ': (Widget ': (Object ': (ImplementorIface ': (Actionable ': (Buildable ': ([] :: [Type])))))))))

class (GObject o, IsDescendantOf ComboRow o) => IsComboRow o Source #

Type class for types which can be safely cast to ComboRow, for instance with toComboRow.

Instances
(GObject o, IsDescendantOf ComboRow o) => IsComboRow o Source # 
Instance details

Defined in GI.Handy.Objects.ComboRow

toComboRow :: (MonadIO m, IsComboRow o) => o -> m ComboRow Source #

Cast to ComboRow, for types for which this is known to be safe. For general casts, use castTo.

noComboRow :: Maybe ComboRow Source #

A convenience alias for Nothing :: Maybe ComboRow.

Methods

bindModel

comboRowBindModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) 
=> a

self: a ComboRow

-> Maybe b

model: the ListModel to be bound to self

-> Maybe ListBoxCreateWidgetFunc

createListWidgetFunc: a function that creates widgets for items to display in the list, or Nothing in case you also passed Nothing as model

-> Maybe ListBoxCreateWidgetFunc

createCurrentWidgetFunc: a function that creates widgets for items to display as the seleted item, or Nothing in case you also passed Nothing as model

-> m () 

Binds model to self.

If self was already bound to a model, that previous binding is destroyed.

The contents of self are cleared and then filled with widgets that represent items from model. self is updated whenever model changes. If model is Nothing, self is left empty.

Since: 0.0.6

bindNameModel

comboRowBindNameModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) 
=> a

self: a ComboRow

-> Maybe b

model: the ListModel to be bound to self

-> Maybe ComboRowGetNameFunc

getNameFunc: a function that creates names for items, or Nothing in case you also passed Nothing as model

-> m () 

Binds model to self.

If self was already bound to a model, that previous binding is destroyed.

The contents of self are cleared and then filled with widgets that represent items from model. self is updated whenever model changes. If model is Nothing, self is left empty.

This is more conventient to use than comboRowBindModel if you want to represent items of the model with names.

Since: 0.0.6

getModel

comboRowGetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a) 
=> a

self: a ComboRow

-> m (Maybe ListModel)

Returns: the ListModel bound to self or Nothing

Gets the model bound to self, or Nothing if none is bound.

Since: 0.0.6

getSelectedIndex

comboRowGetSelectedIndex Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a) 
=> a

self: a ListBoxRow

-> m Int32

Returns: the index of the selected item, or -1 if no item is selected

Gets the index of the selected item in its ListModel.

Since: 0.0.7

new

comboRowNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ComboRow

Returns: a new ComboRow

Creates a new ComboRow.

Since: 0.0.6

setForEnum

comboRowSetForEnum Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a) 
=> a

self: a ComboRow

-> GType

enumType: the enumeration GType to be bound to self

-> Maybe ComboRowGetEnumValueNameFunc

getNameFunc: a function that creates names for items, or Nothing in case you also passed Nothing as model

-> m () 

Creates a model for enumType and binds it to self. The items of the model will be EnumValueObject objects.

If self was already bound to a model, that previous binding is destroyed.

The contents of self are cleared and then filled with widgets that represent items from model. self is updated whenever model changes. If model is Nothing, self is left empty.

This is more conventient to use than comboRowBindNameModel if you want to represent values of an enumeration with names.

See enumValueRowName.

Since: 0.0.6

setSelectedIndex

comboRowSetSelectedIndex Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a) 
=> a

self: a ComboRow

-> Int32

selectedIndex: the index of the selected item

-> m () 

Sets the index of the selected item in its ListModel.

Since: 0.0.7

Properties

selectedIndex

The index of the selected item in its ListModel.

Since: 0.0.7

constructComboRowSelectedIndex :: IsComboRow o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selected-index” property. This is rarely needed directly, but it is used by new.

getComboRowSelectedIndex :: (MonadIO m, IsComboRow o) => o -> m Int32 Source #

Get the value of the “selected-index” property. When overloading is enabled, this is equivalent to

get comboRow #selectedIndex

setComboRowSelectedIndex :: (MonadIO m, IsComboRow o) => o -> Int32 -> m () Source #

Set the value of the “selected-index” property. When overloading is enabled, this is equivalent to

set comboRow [ #selectedIndex := value ]