Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Wish = Wish {
- wishLock :: BSem
- eventQueue :: EqGuardedChannel BindTag EventInfo
- coQueue :: EqGuardedChannel CallBackId ()
- bindTags :: MVar BindTag
- readWish :: GuardedEvent (EqMatch TclMessageType) (TclMessageType, String)
- writeWish :: CStringLen -> IO ()
- destroyWish :: IO ()
- bufferedCommands :: MVar (Int, TclScript)
- oID :: ObjectID
- wish :: Wish
- type TclCmd = String
- type TclScript = [TclCmd]
- data TclMessageType
- execCmd :: TclCmd -> IO ()
- evalCmd :: TclCmd -> IO String
- execTclScript :: TclScript -> IO ()
- evalTclScript :: TclScript -> IO String
- execMethod :: GUIObject a => a -> (ObjectName -> TclScript) -> IO ()
- evalMethod :: (GUIObject a, GUIValue b) => a -> (ObjectName -> TclScript) -> IO b
- setTclVariable :: GUIValue a => String -> a -> IO ()
- getTclVariable :: GUIValue a => String -> IO a
- module HTk.Kernel.GUIValue
- module HTk.Kernel.GUIObjectName
- module HTk.Kernel.GUIObjectKind
- data GUI = GUI GUIOBJECT (Ref GST)
- getGUI :: IO GUI
- type ConfigOption = (ConfigID, GUIVALUE)
- type ConfigID = String
- showConfigs :: [(ConfigID, GUIVALUE)] -> String
- showConfig :: (ConfigID, GUIVALUE) -> String
- class GUIObject w => HasEnable w where
- data GUIOBJECT
- data OST = OST {}
- class GUIObject w where
- class Object o where
- newtype ObjectID :: * = ObjectID Int
- getObjectNo :: GUIOBJECT -> Int
- getParentObjectID :: GUIOBJECT -> IO ObjectID
- createGUIObject :: GUIOBJECT -> ObjectKind -> Methods -> IO GUIOBJECT
- createHTkObject :: Methods -> IO GUIOBJECT
- createWidget :: GUIOBJECT -> ObjectKind -> IO GUIOBJECT
- lookupGUIObjectByName :: WidgetName -> IO (Maybe GUIOBJECT)
- lookupGUIObject :: ObjectID -> IO GUIOBJECT
- getParentPathName :: GUIObject w => w -> IO (Maybe ObjectName)
- getParentObject :: GUIObject w => w -> IO (Maybe GUIOBJECT)
- getObjectKind :: GUIOBJECT -> IO ObjectKind
- setObjectKind :: GUIOBJECT -> ObjectKind -> IO ()
- getObjectName :: GUIOBJECT -> IO ObjectName
- setObjectName :: GUIOBJECT -> ObjectName -> IO ()
- data Methods = Methods {
- cgetCmd :: ObjectName -> ConfigID -> TclScript
- csetCmd :: ObjectName -> [ConfigOption] -> TclScript
- createCmd :: ObjectName -> ObjectKind -> ObjectName -> ObjectID -> [ConfigOption] -> TclScript
- packCmd :: ObjectName -> [PackOption] -> TclScript
- gridCmd :: ObjectName -> [GridPackOption] -> TclScript
- destroyCmd :: ObjectName -> TclScript
- bindCmd :: ObjectName -> BindTag -> [WishEvent] -> EventInfoSet -> Bool -> TclScript
- unbindCmd :: ObjectName -> BindTag -> [WishEvent] -> Bool -> TclScript
- cleanupCmd :: ObjectID -> ObjectName -> TclScript
- defMethods :: Methods
- voidMethods :: Methods
- setMethods :: GUIOBJECT -> Methods -> IO ()
- data WishEvent = WishEvent [WishEventModifier] WishEventType
- data WishEventType
- data WishEventModifier
- newtype KeySym = KeySym String
- bind :: GUIObject wid => wid -> [WishEvent] -> IO (Event EventInfo, IO ())
- bindSimple :: GUIObject wid => wid -> WishEventType -> IO (Event (), IO ())
- bindPath :: Widget wid => wid -> [WishEvent] -> IO (Event EventInfo, IO ())
- bindPathSimple :: Widget wid => wid -> WishEventType -> IO (Event (), IO ())
- class GUIObject w => HasCommand w where
- bindTagS :: BindTag -> String
- showP :: Show a => a -> String -> String
- mkBoundCmdArg :: BindTag -> EventInfoSet -> Bool -> String
- data BindTag
- data EventInfoSet
- tkDeclVar :: String -> String -> TclScript
- tkUndeclVar :: String -> TclScript
Documentation
Wish | |
|
data TclMessageType Source
execTclScript :: TclScript -> IO () Source
evalTclScript :: TclScript -> IO String Source
execMethod :: GUIObject a => a -> (ObjectName -> TclScript) -> IO () Source
evalMethod :: (GUIObject a, GUIValue b) => a -> (ObjectName -> TclScript) -> IO b Source
setTclVariable :: GUIValue a => String -> a -> IO () Source
getTclVariable :: GUIValue a => String -> IO a Source
submodules
module HTk.Kernel.GUIValue
module HTk.Kernel.GUIObjectName
module HTk.Kernel.GUIObjectKind
tool instance
Widget configuration
type ConfigOption = (ConfigID, GUIVALUE) Source
showConfigs :: [(ConfigID, GUIVALUE)] -> String Source
showConfig :: (ConfigID, GUIVALUE) -> String Source
enabling / disabling of widgets
class GUIObject w => HasEnable w where Source
Stateful objects that can be enabled or disabled instantiate the
class HasEnable
.
Nothing
HasEnable MenuCascade | A menu cascade item is a stateful object, it can be enabled or disabled. |
HasEnable MenuCheckButton | A menu checkbutton is a stateful object, it can be enabled or disabled. |
HasEnable MenuCommand | A menu command is a stateful object, it can be enabled or disabled. |
HasEnable MenuRadioButton | A menu radiobutton is a stateful object, it can be enabled or disabled. |
HasEnable Button | A button widget is a stateful widget, it can be enabled or disabled. |
HasEnable ScrollBar | A scrollbar widget is a stateful widget, it can be enabled or disabled. |
HasEnable Canvas | A canvas widget is a stateful widget, it can be enabled or disabled. |
HasEnable Editor | A editor widget is a stateful widget, it can be enabled or disabled. |
HasEnable MenuButton | A menubutton widget is a stateful widget, it can be enabled or disabled. |
HasEnable SelectBox | A select box is a stateful widget, it can be enabled or disabled. |
HasEnable IconBar | An icon bar is a stateful widget, it can be enabled or disabled. |
HasEnable SpinButton | A spin button is a stateful widget, it can be enabled or disabled. |
HasEnable (CheckButton a) | A checkbutton widget is a stateful widget, it can be enabled or disabled. |
HasEnable (Entry a) | An entry field is a stateful widget - it can be enabled of disabled. |
HasEnable (ListBox a) | A listbox is a stateful widget - it can be enabled or disabled. |
GUIValue a => HasEnable (ComboBox a) | A combo box widget is a stateful widget, it can be enabled or disabled. |
HasEnable (OptionMenu a) | An option menu is a stateful widget, it can be enabled or disabled. |
HasEnable (RadioButton a) | A radiobutton widget is a stateful widget, it can be enabled or disabled. |
HasEnable (Scale a) | A scale widget is a stateful widget, it can be enabled or disabled. |
HasEnable (InputForm a) | |
HasEnable (Prompt a) | A prompt is a stateful component, it can be enabled or disabled. |
HasEnable (RecordField a b) | |
HasEnable (EnumField a b) | |
HasEnable (TextField a b) | |
HasEnable (CheckboxField a b) | |
HasEnable (NumEntryField a b) | |
HasEnable (EntryField a b) |
GUIObjects and methods (internal representation of Tk-Widgets)
OST | |
|
class GUIObject w where Source
class Object o where
Object ChildProcess | |
Object SimpleTool | |
Object Wish | |
Object GUIOBJECT | |
Object GUI | |
Object CurrentFocus | Internal. |
Object CurrentGrab | Internal. |
Object (SimpleListBoxItem val) | |
Object (SimpleListBox val) |
getObjectNo :: GUIOBJECT -> Int Source
createGUIObject :: GUIOBJECT -> ObjectKind -> Methods -> IO GUIOBJECT Source
createHTkObject :: Methods -> IO GUIOBJECT Source
createWidget :: GUIOBJECT -> ObjectKind -> IO GUIOBJECT Source
lookupGUIObject :: ObjectID -> IO GUIOBJECT Source
getParentPathName :: GUIObject w => w -> IO (Maybe ObjectName) Source
getObjectKind :: GUIOBJECT -> IO ObjectKind Source
setObjectKind :: GUIOBJECT -> ObjectKind -> IO () Source
getObjectName :: GUIOBJECT -> IO ObjectName Source
setObjectName :: GUIOBJECT -> ObjectName -> IO () Source
Methods | |
|
setMethods :: GUIOBJECT -> Methods -> IO () Source
events
data WishEventType Source
data WishEventModifier Source
bind :: GUIObject wid => wid -> [WishEvent] -> IO (Event EventInfo, IO ()) Source
Binds an event for this widget. The second action returned unbinds the event.
bindSimple :: GUIObject wid => wid -> WishEventType -> IO (Event (), IO ()) Source
Simple version of bind for only one event and without modifiers.
bindPath :: Widget wid => wid -> [WishEvent] -> IO (Event EventInfo, IO ()) Source
Binds an event for this widget and its parent widgets. The second action returned unbinds the event.
bindPathSimple :: Widget wid => wid -> WishEventType -> IO (Event (), IO ()) Source
Simple version of bindPath for only one event and without modifiers.
class GUIObject w => HasCommand w where Source
Nothing
HasCommand MenuCheckButton | When a menu checkbutton is clicked, a corresponding event is invoked. |
HasCommand MenuCommand | When a menu command is clicked, a corresponding event is invoked. |
HasCommand MenuRadioButton | When a menu radiobutton is clicked, a corresponding event is invoked. |
HasCommand Button | When a button is clicked, a corresponding event is invoked. |
HasCommand MenuButton | When a menubutton is clicked, a corresponding event is invoked. |
HasCommand (CheckButton a) | When a checkbutton is clicked, a corresponding event is invoked. |
HasCommand (RadioButton a) | When a radiobutton is clicked, a corresponding event is invoked. |
mkBoundCmdArg :: BindTag -> EventInfoSet -> Bool -> String Source
data EventInfoSet Source
Tk variables
tkUndeclVar :: String -> TclScript Source