| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.UI.FLTK.LowLevel.Widget
Synopsis
- widgetCustom :: Rectangle -> Maybe Text -> (Ref Widget -> IO ()) -> CustomWidgetFuncs Widget -> IO (Ref Widget)
- widgetMaker :: forall a. Parent a Widget => Rectangle -> Maybe Text -> Maybe (Ref a -> IO ()) -> Maybe (CustomWidgetFuncs a) -> (Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ())) -> (Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ())) -> IO (Ref a)
- data CustomWidgetFuncs a = CustomWidgetFuncs {
- handleCustom :: Maybe (Ref a -> Event -> IO (Either UnknownEvent ()))
- resizeCustom :: Maybe (Ref a -> Rectangle -> IO ())
- showCustom :: Maybe (Ref a -> IO ())
- hideCustom :: Maybe (Ref a -> IO ())
- defaultCustomWidgetFuncs :: forall a. Parent a Widget => CustomWidgetFuncs a
- fillCustomWidgetFunctionStruct :: forall a. Parent a Widget => Ptr () -> Maybe (Ref a -> IO ()) -> CustomWidgetFuncs a -> IO ()
- customWidgetFunctionStruct :: forall a. Parent a Widget => Maybe (Ref a -> IO ()) -> CustomWidgetFuncs a -> IO (Ptr ())
- data WidgetFlag
- = WidgetFlagInactive
- | WidgetFlagInvisible
- | WidgetFlagOutput
- | WidgetFlagNoBorder
- | WidgetFlagForcePosition
- | WidgetFlagNonModal
- | WidgetFlagShortcutLabel
- | WidgetFlagChanged
- | WidgetFlagOverride
- | WidgetFlagVisibleFocus
- | WidgetFlagCopiedLabel
- | WidgetFlagClipChildren
- | WidgetFlagMenuWindow
- | WidgetFlagTooltipWindow
- | WidgetFlagModal
- | WidgetFlagNoOverlay
- | WidgetFlagGroupRelative
- | WidgetFlagCopiedTooltip
- | WidgetFlagFullscreen
- | WidgetFlagMacUseAccentsMenu
- | WidgetFlagNeedsKeyboard
- | WidgetFlagUserFlag3
- | WidgetFlagUserFlag2
- | WidgetFlagUserFlag1
Constructor
Arguments
| :: Parent a Widget | |
| => Rectangle | Position and size |
| -> Maybe Text | Title |
| -> Maybe (Ref a -> IO ()) | Custom drawing function |
| -> Maybe (CustomWidgetFuncs a) | Custom functions |
| -> (Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ())) | Foreign constructor to call if only custom functions are given |
| -> (Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ())) | Foreign constructor to call if both title and custom functions are given |
| -> IO (Ref a) | Reference to the widget |
Custom
data CustomWidgetFuncs a Source #
Overrideable Widget functions
| Do not create this directly. Instead use defaultWidgetCustomFuncs
Constructors
| CustomWidgetFuncs | |
Fields
| |
defaultCustomWidgetFuncs :: forall a. Parent a Widget => CustomWidgetFuncs a Source #
An empty set of functions to pass to widgetCustom.
fillCustomWidgetFunctionStruct :: forall a. Parent a Widget => Ptr () -> Maybe (Ref a -> IO ()) -> CustomWidgetFuncs a -> IO () Source #
customWidgetFunctionStruct :: forall a. Parent a Widget => Maybe (Ref a -> IO ()) -> CustomWidgetFuncs a -> IO (Ptr ()) Source #
Given a record of functions, return a pointer to a struct with function pointers back to those functions.
Only of interest to Widget contributors.
data WidgetFlag Source #
Constructors
Instances
| Enum WidgetFlag Source # | |
Defined in Graphics.UI.FLTK.LowLevel.Widget Methods succ :: WidgetFlag -> WidgetFlag # pred :: WidgetFlag -> WidgetFlag # toEnum :: Int -> WidgetFlag # fromEnum :: WidgetFlag -> Int # enumFrom :: WidgetFlag -> [WidgetFlag] # enumFromThen :: WidgetFlag -> WidgetFlag -> [WidgetFlag] # enumFromTo :: WidgetFlag -> WidgetFlag -> [WidgetFlag] # enumFromThenTo :: WidgetFlag -> WidgetFlag -> WidgetFlag -> [WidgetFlag] # | |
| Eq WidgetFlag Source # | |
Defined in Graphics.UI.FLTK.LowLevel.Widget | |
| Show WidgetFlag Source # | |
Defined in Graphics.UI.FLTK.LowLevel.Widget Methods showsPrec :: Int -> WidgetFlag -> ShowS # show :: WidgetFlag -> String # showList :: [WidgetFlag] -> ShowS # | |
Hierarchy
Widget Functions
activate ::RefWidget->IO() active ::RefWidget->IO(Bool) activeR ::RefWidget->IO(Bool) changed ::RefWidget->IO(Bool) clearActive ::RefWidget->IO() clearChanged ::RefWidget->IO() clearDamage ::RefWidget->IO() clearDamageThenSet ::RefWidget-> [Damage] ->IO() clearFlag ::RefWidget->WidgetFlag->IO() clearOutput ::RefWidget->IO() clearVisible ::RefWidget->IO() clearVisibleFocus ::RefWidget->IO() contains:: (ParentaWidget) =>RefWidget->Refa ->IOBoolcopyTooltip ::RefWidget->Text->IO() deactivate ::RefWidget->IO() destroy ::RefWidget->IO() doCallback ::RefWidget->IO() drawBackdrop ::RefWidget->IO() drawBox ::RefWidget->IO() drawBoxWithBoxtype ::RefWidget->Boxtype->Color->MaybeRectangle->IO() drawFocus ::RefWidget->Maybe(Boxtype,Rectangle) ->IO() drawLabel ::RefWidget->Maybe('Rectangle,Alignments') ->IO() flags ::RefWidget->IO[WidgetFlag] getAlign ::RefWidget->IOAlignmentsgetBox ::RefWidget->IO(Boxtype) getColor ::RefWidget->IO(Color) getDamage ::RefWidget->IO([Damage)] getDeimage ::RefWidget->IO(Maybe(RefImage)) getH ::RefWidget->IO(Height) getImage ::RefWidget->IO(Maybe(RefImage)) getLabel ::RefWidget->IOTextgetLabelcolor ::RefWidget->IO(Color) getLabelfont ::RefWidget->IO(Font) getLabelsize ::RefWidget->IO(FontSize) getLabeltype ::RefWidget->IO(Labeltype) getOutput ::RefWidget->IO(Int) getParent ::RefWidget->IO(Maybe(RefGroup)) getRectangle:: (Matchobj ~FindOporig orig (GetX()),Matchobj ~FindOporig orig (GetY()),Matchobj ~FindOporig orig (GetW()),Matchobj ~FindOporig orig (GetH()),Op(GetX()) obj orig (IOX,)Op(GetY()) obj orig (IOY,)Op(GetW()) obj orig (IOWidth,)Op(GetH()) obj orig (IOHeight,)) =>RefWidget->IORectanglegetSelectionColor ::RefWidget->IO(Color) getTooltip ::RefWidget->IOTextgetTopWindow ::RefWidget->IO(Maybe(RefWindow)) getTopWindowOffset ::RefWidget->IO(Position) getType_ ::RefWidget->IO(Word8) getVisible ::RefWidget->IOBoolgetVisibleFocus ::RefWidget->IO(Bool) getVisibleR ::RefWidget->IOBoolgetW ::RefWidget->IO(Width) getWhen ::RefWidget->IO[When] getWindow ::RefWidget->IO(Maybe(RefWindow)) getX ::RefWidget->IO(X) getY ::RefWidget->IO(Y) handle ::RefWidget->Event->IO(EitherUnknownEvent()) hasCallback ::RefWidget->IO(Bool) hide ::RefWidget->IO() hideSuper ::RefWidget->IO() inside:: (ParentaWidget) =>RefWidget->Refa ->IO(Bool) measureLabel ::RefWidget->MaybeWidth->IO(Size) modifyVisibleFocus ::RefWidget->Bool->IO() redraw ::RefWidget->IO() redrawLabel ::RefWidget->IO() resize ::RefWidget->Rectangle->IO() resizeSuper ::RefWidget->Rectangle->IO() setActive ::RefWidget->IO() setAlign ::RefWidget->Alignments->IO() setBox ::RefWidget->Boxtype->IO() setCallback ::RefWidget-> (Reforig ->IO()) ->IO() setChanged ::RefWidget->IO() setColor ::RefWidget->Color->IO() setColorWithBgSel ::RefWidget->Color->Color->IO() setDamage ::RefWidget-> [Damage] ->IO() setDamageInside ::RefWidget-> [Damage] ->Rectangle->IO() setDeimage:: (ParentaImage) =>RefWidget->Maybe(Refa ) ->IO() setFlag ::RefWidget->WidgetFlag->IO() setImage:: (ParentaImage) =>RefWidget->Maybe(Refa ) ->IO() setLabel ::RefWidget->Text->IO() setLabelcolor ::RefWidget->Color->IO() setLabelfont ::RefWidget->Font->IO() setLabelsize ::RefWidget->FontSize->IO() setLabeltype ::RefWidget->Labeltype->ResolveImageLabelConflict->IO() setOutput ::RefWidget->IO() setParent:: (ParentaGroup) =>RefWidget->Maybe(Refa) ->IO() setSelectionColor ::RefWidget->Color->IO() setTooltip ::RefWidget->Text->IO() setType ::RefWidget->Word8->IO() setVisible ::RefWidget->IO() setVisibleFocus ::RefWidget->IO() setWhen ::RefWidget-> [When] ->IO() showWidget ::RefWidget->IO() showWidgetSuper ::RefWidget->IO() takeFocus ::RefWidget->IO(EitherNoChange()) takesevents ::RefWidget->IO(Bool)
Orphan instances
| impl ~ IO () => Op (DoCallback ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (Changed ()) Widget orig impl Source # | |
| impl ~ (WidgetFlag -> IO ()) => Op (ClearFlag ()) Widget orig impl Source # | |
| impl ~ (WidgetFlag -> IO ()) => Op (SetFlag ()) Widget orig impl Source # | |
| impl ~ IO [WidgetFlag] => Op (Flags ()) Widget orig impl Source # | |
| impl ~ (Maybe (Boxtype, Rectangle) -> IO ()) => Op (DrawFocus ()) Widget orig impl Source # | |
| impl ~ IO () => Op (DrawBackdrop ()) Widget orig impl Source # | |
| impl ~ (Boxtype -> Color -> Maybe Rectangle -> IO ()) => Op (DrawBoxWithBoxtype ()) Widget orig impl Source # | |
| impl ~ IO () => Op (DrawBox ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (HasCallback ()) Widget orig impl Source # | |
| impl ~ ((Ref orig -> IO ()) -> IO ()) => Op (SetCallback ()) Widget orig impl Source # | |
| impl ~ (Rectangle -> IO ()) => Op (Resize ()) Widget orig impl Source # | |
| impl ~ (Rectangle -> IO ()) => Op (ResizeSuper ()) Widget orig impl Source # | |
| impl ~ IO Position => Op (GetTopWindowOffset ()) Widget orig impl Source # | |
| impl ~ IO (Maybe (Ref Window)) => Op (GetTopWindow ()) Widget orig impl Source # | |
| impl ~ IO (Maybe (Ref Window)) => Op (GetWindow ()) Widget orig impl Source # | |
| impl ~ (Maybe Width -> IO Size) => Op (MeasureLabel ()) Widget orig impl Source # | |
| impl ~ ([Damage] -> Rectangle -> IO ()) => Op (SetDamageInside ()) Widget orig impl Source # | |
| impl ~ ([Damage] -> IO ()) => Op (SetDamage ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ClearDamage ()) Widget orig impl Source # | |
| impl ~ ([Damage] -> IO ()) => Op (ClearDamageThenSet ()) Widget orig impl Source # | |
| impl ~ IO [Damage] => Op (GetDamage ()) Widget orig impl Source # | |
| impl ~ IO () => Op (RedrawLabel ()) Widget orig impl Source # | |
| impl ~ IO () => Op (Redraw ()) Widget orig impl Source # | |
| (Parent a Widget, impl ~ (Ref a -> IO Bool)) => Op (Inside ()) Widget orig impl Source # | |
| (Parent a Widget, impl ~ (Ref a -> IO Bool)) => Op (Contains ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (GetVisibleFocus ()) Widget orig impl Source # | |
| impl ~ (Bool -> IO ()) => Op (ModifyVisibleFocus ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ClearVisibleFocus ()) Widget orig impl Source # | |
| impl ~ IO () => Op (SetVisibleFocus ()) Widget orig impl Source # | |
| impl ~ IO (Either NoChange ()) => Op (TakeFocus ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ClearActive ()) Widget orig impl Source # | |
| impl ~ IO () => Op (SetActive ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ClearChanged ()) Widget orig impl Source # | |
| impl ~ IO () => Op (SetChanged ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (Takesevents ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ClearOutput ()) Widget orig impl Source # | |
| impl ~ IO () => Op (SetOutput ()) Widget orig impl Source # | |
| impl ~ IO Int => Op (GetOutput ()) Widget orig impl Source # | |
| impl ~ IO () => Op (Deactivate ()) Widget orig impl Source # | |
| impl ~ IO () => Op (Activate ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (ActiveR ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (Active ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ClearVisible ()) Widget orig impl Source # | |
| impl ~ IO () => Op (SetVisible ()) Widget orig impl Source # | |
| impl ~ IO () => Op (Hide ()) Widget orig impl Source # | |
| impl ~ IO () => Op (HideSuper ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ShowWidget ()) Widget orig impl Source # | |
| impl ~ IO () => Op (ShowWidgetSuper ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (GetVisibleR ()) Widget orig impl Source # | |
| impl ~ IO Bool => Op (GetVisible ()) Widget orig impl Source # | |
| impl ~ ([When] -> IO ()) => Op (SetWhen ()) Widget orig impl Source # | |
| impl ~ IO [When] => Op (GetWhen ()) Widget orig impl Source # | |
| impl ~ (Text -> IO ()) => Op (SetTooltip ()) Widget orig impl Source # | |
| impl ~ (Text -> IO ()) => Op (CopyTooltip ()) Widget orig impl Source # | |
| impl ~ IO Text => Op (GetTooltip ()) Widget orig impl Source # | |
| (Parent a Image, impl ~ (Maybe (Ref a) -> IO ())) => Op (SetDeimage ()) Widget orig impl Source # | |
| impl ~ IO (Maybe (Ref Image)) => Op (GetDeimage ()) Widget orig impl Source # | |
| (Parent a Image, impl ~ (Maybe (Ref a) -> IO ())) => Op (SetImage ()) Widget orig impl Source # | |
| impl ~ IO (Maybe (Ref Image)) => Op (GetImage ()) Widget orig impl Source # | |
| impl ~ (FontSize -> IO ()) => Op (SetLabelsize ()) Widget orig impl Source # | |
| impl ~ IO FontSize => Op (GetLabelsize ()) Widget orig impl Source # | |
| impl ~ (Font -> IO ()) => Op (SetLabelfont ()) Widget orig impl Source # | |
| impl ~ IO Font => Op (GetLabelfont ()) Widget orig impl Source # | |
| impl ~ (Color -> IO ()) => Op (SetLabelcolor ()) Widget orig impl Source # | |
| impl ~ IO Color => Op (GetLabelcolor ()) Widget orig impl Source # | |
| impl ~ (Labeltype -> ResolveImageLabelConflict -> IO ()) => Op (SetLabeltype ()) Widget orig impl Source # | |
| impl ~ IO Labeltype => Op (GetLabeltype ()) Widget orig impl Source # | |
| impl ~ (Text -> IO ()) => Op (SetLabel ()) Widget orig impl Source # | |
| impl ~ IO Text => Op (GetLabel ()) Widget orig impl Source # | |
| impl ~ (Color -> IO ()) => Op (SetSelectionColor ()) Widget orig impl Source # | |
| impl ~ IO Color => Op (GetSelectionColor ()) Widget orig impl Source # | |
| impl ~ (Color -> Color -> IO ()) => Op (SetColorWithBgSel ()) Widget orig impl Source # | |
| impl ~ (Color -> IO ()) => Op (SetColor ()) Widget orig impl Source # | |
| impl ~ IO Color => Op (GetColor ()) Widget orig impl Source # | |
| impl ~ (Boxtype -> IO ()) => Op (SetBox ()) Widget orig impl Source # | |
| impl ~ IO Boxtype => Op (GetBox ()) Widget orig impl Source # | |
| impl ~ IO Alignments => Op (GetAlign ()) Widget orig impl Source # | |
| impl ~ (Alignments -> IO ()) => Op (SetAlign ()) Widget orig impl Source # | |
| (Match obj ~ FindOp orig orig (GetX ()), Match obj ~ FindOp orig orig (GetY ()), Match obj ~ FindOp orig orig (GetW ()), Match obj ~ FindOp orig orig (GetH ()), Op (GetX ()) obj orig (IO X), Op (GetY ()) obj orig (IO Y), Op (GetW ()) obj orig (IO Width), Op (GetH ()) obj orig (IO Height), impl ~ IO Rectangle) => Op (GetRectangle ()) Widget orig impl Source # | |
| impl ~ IO Height => Op (GetH ()) Widget orig impl Source # | |
| impl ~ IO Width => Op (GetW ()) Widget orig impl Source # | |
| impl ~ IO Y => Op (GetY ()) Widget orig impl Source # | |
| impl ~ IO X => Op (GetX ()) Widget orig impl Source # | |
| impl ~ (Maybe (Rectangle, Alignments) -> IO ()) => Op (DrawLabel ()) Widget orig impl Source # | |
| impl ~ (Word8 -> IO ()) => Op (SetType ()) Widget orig impl Source # | |
| impl ~ IO Word8 => Op (GetType_ ()) Widget orig impl Source # | |
| (Parent a Group, impl ~ (Maybe (Ref a) -> IO ())) => Op (SetParent ()) Widget orig impl Source # | |
| impl ~ IO (Maybe (Ref Group)) => Op (GetParent ()) Widget orig impl Source # | |
| impl ~ (Event -> IO (Either UnknownEvent ())) => Op (Handle ()) Widget orig impl Source # | |
| impl ~ IO () => Op (Destroy ()) Widget orig impl Source # | |