-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Binding to the glade library.
--   
--   This library allows to load externally stored user interfaces into
--   programs. This allows alteration of the interface without
--   recompilation of the program.
--   
--   Note that this functionality is now provided in gtk directly (as of
--   version 2.12 of the gtk+ C lib) by the Graphics.UI.Gtk.Builder module.
@package glade
@version 0.12.1

-- | Libglade facilitates loading of XML specifications of whole widget
--   trees that have been interactively designed with the GUI builder
--   Glade. The present module exports operations for manipulating
--   GladeXML objects.
--   
--   
--   
- This binding does not support Libglade functionality that is
--   exclusively meant for extending Libglade with new widgets. Like new
--   widgets, such functionality is currently expected to be implemented in
--   C.
--   
module Graphics.UI.Gtk.Glade
class GObjectClass o => GladeXMLClass o
data GladeXML

-- | Create a new XML object (and the corresponding widgets) from the given
--   XML file.
--   
--   This corresponds to xmlNewWithRootAndDomain, but without the
--   ability to specify a root widget or translation domain.
xmlNew :: FilePath -> IO (Maybe GladeXML)

-- | Create a new GladeXML object (and the corresponding widgets) from the
--   given XML file.
--   
--   Optionally it will only build the interface from the widget node
--   root (if it is not Nothing). This feature is useful if
--   you only want to build say a toolbar or menu from the XML file, but
--   not the window it is embedded in.
--   
--   Note also that the XML parse tree is cached to speed up creating
--   another GladeXML object for the same file.
xmlNewWithRootAndDomain :: FilePath -> Maybe String -> Maybe String -> IO (Maybe GladeXML)

-- | Get the widget that has the given name in the interface description.
--   If the named widget cannot be found or is of the wrong type the result
--   is an error.
xmlGetWidget :: WidgetClass widget => GladeXML -> (GObject -> widget) -> String -> IO widget

-- | Like xmlGetWidget but it does not do any casting and if the
--   named widget is not found then the result is Nothing rather
--   than an error.
xmlGetWidgetRaw :: GladeXML -> String -> IO (Maybe Widget)
