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


-- | Backend for rendering diagrams directly to GTK windows
--   
--   An optional add-on to the diagrams-cairo package which allows
--   rendering diagrams directly to GTK windows.
@package diagrams-gtk
@version 1.4


-- | Convenient interface to rendering diagrams directly on Gtk widgets
--   using the Cairo backend.
module Diagrams.Backend.Gtk

-- | Render a diagram to a DrawingArea with double buffering, rescaling to
--   fit the full area.
defaultRender :: Monoid' m => DrawingArea -> QDiagram Cairo V2 Double m -> IO ()

-- | Convert a Diagram to the backend coordinates.
--   
--   Provided to Query the diagram with coordinates from a mouse click
--   event.
--   
--   <pre>
--   widget `on` buttonPressEvent $ tryEvent $ do
--     click &lt;- eventClick
--     (x,y) &lt;- eventCoordinates
--     let result = runQuery (query $ toGtkCoords myDiagram) (x ^&amp; y)
--     do_something_with result
--   </pre>
--   
--   <a>toGtkCoords</a> does no rescaling of the diagram, however it is
--   centered in the window.
toGtkCoords :: Monoid' m => QDiagram Cairo V2 Double m -> QDiagram Cairo V2 Double m

-- | Render a diagram to a <a>DrawableClass</a> with double buffering. No
--   rescaling or transformations will be performed.
--   
--   Typically the diagram will already have been transformed by
--   <a>toGtkCoords</a>.
renderToGtk :: (DrawableClass dc, Monoid' m) => dc -> QDiagram Cairo V2 Double m -> IO ()
