- data RPN
- widgetsFromRpn :: [RPN] -> IO [Widget]
- rWID :: Widget -> RPN
- rCENTER :: RPN
- rLEFT :: RPN
- rRIGHT :: RPN
- rARROW :: ArrowType -> RPN
- rASPECT :: RPN
- rBUTTON :: StockId -> IO () -> RPN
- rEXPANDER :: String -> RPN
- rCOLOR :: Color -> (Color -> IO ()) -> RPN
- rFILE :: FileChooserAction -> RPN
- rFONT :: String -> (String -> IO ()) -> RPN
- rFRAME :: String -> RPN
- rHBOX :: [Packing] -> RPN
- rVBOX :: [Packing] -> RPN
- rHBBOX :: Integral n => n -> RPN
- rVBBOX :: Integral n => n -> RPN
- rHPANE :: (Bool, Bool) -> RPN
- rVPANE :: (Bool, Bool) -> RPN
- rHSCALE :: (Double, Double) -> (Double -> IO ()) -> RPN
- rVSCALE :: (Double, Double) -> (Double -> IO ()) -> RPN
- rHSEPARATOR :: RPN
- rVSEPARATOR :: RPN
- rIMAGE :: FilePath -> RPN
- rLABEL :: String -> RPN
- rNOTEBOOK :: [String] -> RPN
- rSCROLL :: RPN
- rSOCKET :: NativeWindowId -> RPN
- rSPIN :: (Double, Double) -> (Double -> IO ()) -> RPN
- rTEXT :: TextBufferClass b => b -> RPN
- rMAIN :: String -> RPN
Documentation
widgetsFromRpn :: [RPN] -> IO [Widget]Source
After we describe our widgets using a list of RPN
s,
we use widgetsFromRpn
to get them.
Inserts your widget in the stack. Your widget needs to
pass through Gtk.toWidget before applying rWID
.
Insert the last widget inside a container. When that container grows, the widget keeps its natural size, aligned in the center of the container.
Sets the last widget to always keep the aspect ratio of its original size requisition.
rBUTTON :: StockId -> IO () -> RPNSource
Inserts a button into the stack, after a
Graphics.UI.Gtk.General.StockItems.StockId
and an IO ()
to be called when it is clicked.
rEXPANDER :: String -> RPNSource
Packs the last widget in an
Graphics.UI.Gtk.Layout.Expander.Expander
, allowing the
user to hide or show that widget under a label.
rCOLOR :: Color -> (Color -> IO ()) -> RPNSource
Inserts a color chooser button, after an initial
Graphics.UI.Gtk.Gdk.GC.Color
and a Color -> IO ()
to be
called when a new color is choosen.
rFILE :: FileChooserAction -> RPNSource
Inserts a
Graphics.UI.Gtk.Selectors.FileChooserButton.FileChooserButton
after a
to be called when
a file is choosen by the user. (This is not working since
System.IO.FilePath
-> IO ()gtk2hs
do not yet support the file-set
signal for
this widget.)
rFONT :: String -> (String -> IO ()) -> RPNSource
Inserts a font chooser button after a String -> IO ()
to be called when a new font is choosen.
rHSEPARATOR
and rVSEPARATOR
insert, respectively,
horizontal and vertical Graphics.UI.Gtk.Abstract.Separator
s
in the stack.
rIMAGE :: FilePath -> RPNSource
rIMAGE
takes a System.IO.FilePath
to
an image and inserts a widget showing that
image in the stack.
rLABEL
inserts a Graphics.UI.Gtk.Display.Label.Label
in the stack, after a String
. This String
is supposed to be Pango
Graphics.UI.Gtk.Pango.Markup.
rNOTEBOOK :: [String] -> RPNSource
rNOTEBOOK
takes a list of String
labels and add widgets from the stack to a
Graphics.UI.Gtk.Layout.Notebook.Notebook
, as many as the
labels provided.
rSCROLL
packs the last widget in a container
with horizontal and vertical scroll bars.
rSOCKET :: NativeWindowId -> RPNSource
rSOCKET
allows inserting a foreign (from
other program) widget inside the stack, given its
Graphics.UI.Gtk.Embedding.Socket.NativeWindowId
.
rSPIN :: (Double, Double) -> (Double -> IO ()) -> RPNSource
rSPIN
creates a
Graphics.UI.Gtk.Entry.SpinButton.SpinButton
after a
(Double,Double)
interval and a Double -> IO ()
to be
called when the value in the SpinButton
changes.
rTEXT :: TextBufferClass b => b -> RPNSource
rTEXT
creates a text view after a
given buffer, which shall be an instance of
Graphics.UI.Gtk.Multiline.TextBuffer.TextBufferClass
.