1. Compilation Units

    1. Cairo
    2. Cairo.Font_Face
    3. Cairo.Font_Options
    4. Cairo.Image_Surface
    5. Cairo.PDF
    6. Cairo.Matrix
    7. Cairo.Pattern
    8. Cairo.Png
    9. Cairo.SVG
    10. Cairo.Region
    11. Cairo.Scaled_Font
    12. Cairo.Surface
    13. Fontconfig
    14. Gdk
    15. Gdk.Cairo
    16. Gdk.Color
    17. Gdk.Cursor
    18. Gdk.Device
    19. Gdk.Device_Manager
    20. Gdk.Device_Tool
    21. Gdk.Display
    22. Gdk.Display_Manager
    23. Gdk.Dnd
    24. Gdk.Drag_Contexts
    25. Gdk.Drawing_Context
    26. Gdk.Event
      1. Gdk.Event.Handler_Set_User_Data
    27. Gdk.Frame_Clock
    28. Gdk.Frame_Timings
    29. Gdk.GLContext
    30. Gdk.Input
      1. Gdk.Input.Input_Add
    31. Gdk.Keyval
    32. Gdk.Main
    33. Gdk.Monitor
    34. Gdk.Pixbuf
    35. Gdk.RGBA
    36. Gdk.Property
    37. Gdk.Rectangle
    38. Gdk.Screen
    39. Gdk.Seat
    40. Gdk.Threads
    41. Gdk.Types
    42. Gdk.Types.Keysyms
    43. Gdk.Visual
    44. Gdk.Window
      1. Gdk.Window.Invalidate_Maybe_Recurse_User_Data
    45. Gdk.Window_Attr
    46. Glib
    47. Glib.Action
    48. Glib.Action_Group
    49. Glib.Action_Map
    50. Glib.Application
    51. Glib.Cancellable
      1. Glib.Cancellable.Connect_User_Data
    52. Glib.Convert
    53. Glib.Enums
    54. Glib.GSlist
      1. Glib.GSlist.Generic_SList
    55. Glib.Error
    56. Glib.G_Icon
    57. Glib.Generic_Properties
      1. Glib.Generic_Properties.Generic_Enumeration_Property
      2. Glib.Generic_Properties.Generic_Internal_Boxed_Property
      3. Glib.Generic_Properties.Generic_Internal_Discrete_Property
    58. Glib.Glist
      1. Glib.Glist.Generic_List
    59. Glib.Gnodes
      1. Glib.Gnodes.Gnode_Data
    60. Glib.Graphs
    61. Glib.Graphs.Layouts
      1. Glib.Graphs.Layouts.Layered_Layouts
    62. Glib.IOChannel
    63. Glib.Key_File
    64. Glib.List_Model
    65. Glib.Main
      1. Glib.Main.Generic_Sources
    66. Glib.Menu
    67. Glib.Menu_Model
    68. Glib.Messages
    69. Glib.Module
    70. Glib.Notification
    71. Glib.Object
      1. Glib.Object.User_Data
      2. Glib.Object.User_Data_Closure
    72. Glib.Option
      1. Glib.Option.Set_Translate_Func_User_Data
    73. Glib.Poll
    74. Glib.Properties
    75. Glib.Properties.Creation
    76. Glib.Simple_Action
    77. Glib.Simple_Action_Group
    78. Glib.Spawn
    79. Glib.String
    80. Glib.Type_Conversion_Hooks
      1. Glib.Type_Conversion_Hooks.Hook_Registrator
    81. Glib.Types
      1. Glib.Types.Implements
    82. Glib.Unicode
    83. Glib.Utils
    84. Glib.Values
    85. Glib.Variant
    86. Glib.XML
    87. Gtk
    88. Gtk.About_Dialog
    89. Gtk.Accel_Group
    90. Gtk.Accel_Label
    91. Gtk.Accel_Map
      1. Gtk.Accel_Map.Foreach_Unfiltered_User_Data
      2. Gtk.Accel_Map.Foreach_User_Data
    92. Gtk.Action
    93. Gtk.Action_Bar
    94. Gtk.Action_Group
      1. Gtk.Action_Group.Set_Translate_Func_User_Data
    95. Gtk.Actionable
    96. Gtk.Activatable
    97. Gtk.Adjustment
    98. Gtk.Alignment
    99. Gtk.Application
    100. Gtk.Application_Window
    101. Gtk.Arguments
    102. Gtk.Arrow
    103. Gtk.Aspect_Frame
    104. Gtk.Assistant
      1. Gtk.Assistant.Set_Forward_Page_Func_User_Data
    105. Gtk.Bin
    106. Gtk.Binding_Set
    107. Gtk.Bindings
    108. Gtk.Box
    109. Gtk.Buildable
    110. Gtk.Builder
    111. Gtk.Button
    112. Gtk.Button_Box
    113. Gtk.Calendar
      1. Gtk.Calendar.Set_Detail_Func_User_Data
    114. Gtk.Cell_Area
      1. Gtk.Cell_Area.Foreach_Alloc_User_Data
      2. Gtk.Cell_Area.Foreach_User_Data
      3. Gtk.Cell_Area.Set_Cell_Data_Func_User_Data
    115. Gtk.Cell_Area_Box
      1. Gtk.Cell_Area_Box.Set_Cell_Data_Func_User_Data
    116. Gtk.Cell_Area_Context
    117. Gtk.Cell_Editable
    118. Gtk.Cell_Layout
      1. Gtk.Cell_Layout.Set_Cell_Data_Func_User_Data
    119. Gtk.Cell_Renderer
    120. Gtk.Cell_Renderer_Accel
    121. Gtk.Cell_Renderer_Combo
    122. Gtk.Cell_Renderer_Pixbuf
    123. Gtk.Cell_Renderer_Progress
    124. Gtk.Cell_Renderer_Spin
    125. Gtk.Cell_Renderer_Spinner
    126. Gtk.Cell_Renderer_Text
    127. Gtk.Cell_Renderer_Toggle
    128. Gtk.Cell_View
      1. Gtk.Cell_View.Set_Cell_Data_Func_User_Data
    129. Gtk.Check_Button
    130. Gtk.Check_Menu_Item
    131. Gtk.Clipboard
    132. Gtk.Color_Button
    133. Gtk.Color_Chooser
    134. Gtk.Color_Chooser_Dialog
    135. Gtk.Color_Chooser_Widget
    136. Gtk.Color_Selection
    137. Gtk.Color_Selection_Dialog
    138. Gtk.Combo_Box
      1. Gtk.Combo_Box.Set_Cell_Data_Func_User_Data
      2. Gtk.Combo_Box.Set_Row_Separator_Func_User_Data
    139. Gtk.Combo_Box_Text
      1. Gtk.Combo_Box_Text.Set_Cell_Data_Func_User_Data
    140. Gtk.Container
      1. Gtk.Container.Forall_User_Data
      2. Gtk.Container.Foreach_User_Data
    141. Gtk.Css_Provider
    142. Gtk.Css_Section
    143. Gtk.Dialog
    144. Gtk.Dnd
    145. Gtk.Drawing_Area
    146. Gtk.Editable
    147. Gtk.Entry_Buffer
    148. Gtk.Entry_Completion
      1. Gtk.Entry_Completion.Set_Cell_Data_Func_User_Data
      2. Gtk.Entry_Completion.Set_Match_Func_User_Data
    149. Gtk.Enums
    150. Gtk.Event_Box
    151. Gtk.Event_Controller
    152. Gtk.Expander
    153. Gtk.File_Chooser
    154. Gtk.File_Chooser_Button
    155. Gtk.File_Chooser_Dialog
    156. Gtk.File_Chooser_Widget
    157. Gtk.File_Filter
      1. Gtk.File_Filter.Add_Custom_User_Data
    158. Gtk.Fixed
    159. Gtk.Flow_Box
      1. Gtk.Flow_Box.Bind_Model_User_Data
      2. Gtk.Flow_Box.Selected_Foreach_User_Data
      3. Gtk.Flow_Box.Set_Filter_Func_User_Data
      4. Gtk.Flow_Box.Set_Sort_Func_User_Data
    160. Gtk.Flow_Box_Child
    161. Gtk.Font_Button
      1. Gtk.Font_Button.Set_Filter_Func_User_Data
    162. Gtk.Font_Chooser
      1. Gtk.Font_Chooser.Set_Filter_Func_User_Data
    163. Gtk.Font_Chooser_Dialog
      1. Gtk.Font_Chooser_Dialog.Set_Filter_Func_User_Data
    164. Gtk.Font_Chooser_Widget
      1. Gtk.Font_Chooser_Widget.Set_Filter_Func_User_Data
    165. Gtk.Font_Selection
    166. Gtk.Font_Selection_Dialog
    167. Gtk.Frame
    168. Gtk.GLArea
    169. Gtk.GRange
    170. Gtk.GEntry
    171. Gtk.Gesture
    172. Gtk.Gesture_Drag
    173. Gtk.Gesture_Long_Press
    174. Gtk.Gesture_Multi_Press
    175. Gtk.Gesture_Pan
    176. Gtk.Gesture_Rotate
    177. Gtk.Gesture_Single
    178. Gtk.Gesture_Swipe
    179. Gtk.Gesture_Zoom
    180. Gtk.Gradient
    181. Gtk.Grid
    182. Gtk.Handle_Box
    183. Gtk.Hbutton_Box
    184. Gtk.Header_Bar
    185. Gtk.IM_Context
    186. Gtk.IM_Context_Simple
    187. Gtk.IM_Multi_Context
    188. Gtk.Hsv
    189. Gtk.Icon_Factory
    190. Gtk.Icon_Set
    191. Gtk.Icon_Source
    192. Gtk.Icon_Theme
    193. Gtk.Icon_View
      1. Gtk.Icon_View.Selected_Foreach_User_Data
      2. Gtk.Icon_View.Set_Cell_Data_Func_User_Data
    194. Gtk.Image
    195. Gtk.Image_Menu_Item
    196. Gtk.Info_Bar
    197. Gtk.Invisible
    198. Gtk.Label
    199. Gtk.Layout
    200. Gtk.Level_Bar
    201. Gtk.Link_Button
    202. Gtk.List_Box
      1. Gtk.List_Box.Bind_Model_User_Data
      2. Gtk.List_Box.Selected_Foreach_User_Data
      3. Gtk.List_Box.Set_Filter_Func_User_Data
      4. Gtk.List_Box.Set_Header_Func_User_Data
      5. Gtk.List_Box.Set_Sort_Func_User_Data
    203. Gtk.List_Box_Row
    204. Gtk.List_Store
      1. Gtk.List_Store.Foreach_User_Data
      2. Gtk.List_Store.Set_Default_Sort_Func_User_Data
      3. Gtk.List_Store.Set_Sort_Func_User_Data
    205. Gtk.Main
    206. Gtk.Menu
      1. Gtk.Menu.Popup_For_Device_User_Data
      2. Gtk.Menu.Popup_User_Data
    207. Gtk.Menu_Bar
    208. Gtk.Menu_Button
    209. Gtk.Menu_Item
    210. Gtk.Menu_Shell
    211. Gtk.Menu_Tool_Button
    212. Gtk.Message_Dialog
    213. Gtk.Misc
    214. Gtk.Notebook
    215. Gtk.Offscreen_Window
    216. Gtk.Orientable
    217. Gtk.Overlay
    218. Gtk.Page_Setup
    219. Gtk.Paned
    220. Gtk.Paper_Size
    221. Gtk.Popover
    222. Gtk.Print_Context
    223. Gtk.Print_Operation
    224. Gtk.Print_Operation_Preview
    225. Gtk.Print_Settings
      1. Gtk.Print_Settings.Foreach_User_Data
    226. Gtk.Progress_Bar
    227. Gtk.Radio_Action
    228. Gtk.Radio_Button
    229. Gtk.Radio_Menu_Item
    230. Gtk.Radio_Tool_Button
    231. Gtk.Rc
    232. Gtk.Recent_Action
      1. Gtk.Recent_Action.Set_Sort_Func_User_Data
    233. Gtk.Recent_Chooser
      1. Gtk.Recent_Chooser.Set_Sort_Func_User_Data
    234. Gtk.Recent_Chooser_Dialog
      1. Gtk.Recent_Chooser_Dialog.Set_Sort_Func_User_Data
    235. Gtk.Recent_Chooser_Menu
      1. Gtk.Recent_Chooser_Menu.Set_Sort_Func_User_Data
    236. Gtk.Recent_Chooser_Widget
      1. Gtk.Recent_Chooser_Widget.Set_Sort_Func_User_Data
    237. Gtk.Recent_Filter
      1. Gtk.Recent_Filter.Add_Custom_User_Data
    238. Gtk.Recent_Info
    239. Gtk.Recent_Manager
    240. Gtk.Revealer
    241. Gtk.Scale
    242. Gtk.Scale_Button
    243. Gtk.Scrollable
    244. Gtk.Scrollbar
    245. Gtk.Scrolled_Window
    246. Gtk.Search_Bar
    247. Gtk.Search_Entry
    248. Gtk.Selection_Data
    249. Gtk.Separator
    250. Gtk.Separator_Menu_Item
    251. Gtk.Separator_Tool_Item
    252. Gtk.Settings
    253. Gtk.Shortcuts_Window
    254. Gtk.Size_Group
    255. Gtk.Spin_Button
    256. Gtk.Spinner
    257. Gtk.Stack
    258. Gtk.Stack_Switcher
    259. Gtk.Status_Bar
    260. Gtk.Status_Icon
    261. Gtk.Stock
    262. Gtk.Style
    263. Gtk.Style_Context
    264. Gtk.Style_Properties
    265. Gtk.Style_Provider
    266. Gtk.Switch
    267. Gtk.Symbolic_Color
    268. Gtk.Table
    269. Gtk.Target_Entry
    270. Gtk.Target_List
    271. Gtk.Tearoff_Menu_Item
    272. Gtk.Text_Attributes
    273. Gtk.Text_Buffer
    274. Gtk.Text_Child
    275. Gtk.Text_Child_Anchor
    276. Gtk.Text_Iter
    277. Gtk.Text_Mark
    278. Gtk.Text_Tag
    279. Gtk.Text_Tag_Table
      1. Gtk.Text_Tag_Table.Foreach_User_Data
    280. Gtk.Text_View
    281. Gtk.Theming_Engine
    282. Gtk.Toggle_Action
    283. Gtk.Toggle_Button
    284. Gtk.Toggle_Tool_Button
    285. Gtk.Tool_Button
    286. Gtk.Tool_Item
    287. Gtk.Tool_Item_Group
    288. Gtk.Tool_Palette
    289. Gtk.Tool_Shell
    290. Gtk.Toolbar
    291. Gtk.Tooltip
    292. Gtk.Tree_Drag_Dest
    293. Gtk.Tree_Drag_Source
    294. Gtk.Tree_Model
      1. Gtk.Tree_Model.Foreach_User_Data
    295. Gtk.Tree_Model.Utils
    296. Gtk.Tree_Model_Filter
      1. Gtk.Tree_Model_Filter.Foreach_User_Data
      2. Gtk.Tree_Model_Filter.Set_Modify_Func_User_Data
      3. Gtk.Tree_Model_Filter.Set_Visible_Func_User_Data
    297. Gtk.Tree_Model_Sort
      1. Gtk.Tree_Model_Sort.Foreach_User_Data
      2. Gtk.Tree_Model_Sort.Set_Default_Sort_Func_User_Data
      3. Gtk.Tree_Model_Sort.Set_Sort_Func_User_Data
    298. Gtk.Tree_Row_Reference
    299. Gtk.Tree_Selection
      1. Gtk.Tree_Selection.Selected_Foreach_User_Data
      2. Gtk.Tree_Selection.Set_Select_Function_User_Data
    300. Gtk.Tree_Sortable
      1. Gtk.Tree_Sortable.Set_Default_Sort_Func_User_Data
      2. Gtk.Tree_Sortable.Set_Sort_Func_User_Data
    301. Gtk.Tree_Store
      1. Gtk.Tree_Store.Foreach_User_Data
      2. Gtk.Tree_Store.Generic_Set
      3. Gtk.Tree_Store.Set_Default_Sort_Func_User_Data
      4. Gtk.Tree_Store.Set_Sort_Func_User_Data
    302. Gtk.Tree_View
      1. Gtk.Tree_View.Insert_Column_With_Data_Func_User_Data
      2. Gtk.Tree_View.Map_Expanded_Rows_User_Data
      3. Gtk.Tree_View.Set_Column_Drag_Function_User_Data
      4. Gtk.Tree_View.Set_Destroy_Count_Func_User_Data
      5. Gtk.Tree_View.Set_Row_Separator_Func_User_Data
      6. Gtk.Tree_View.Set_Search_Equal_Func_User_Data
      7. Gtk.Tree_View.Set_Search_Position_Func_User_Data
    303. Gtk.Tree_View_Column
      1. Gtk.Tree_View_Column.Set_Cell_Data_Func_User_Data
    304. Gtk.Type_Conversion
    305. Gtk.UI_Manager
    306. Gtk.Vbutton_Box
    307. Gtk.Viewport
    308. Gtk.Volume_Button
    309. Gtk.Widget
      1. Gtk.Widget.Add_Tick_Callback_User_Data
      2. Gtk.Widget.Set_Connect_Func_User_Data
    310. Gtk.Window
    311. Gtkada
    312. Gtkada.Abstract_List_Model
    313. Gtkada.Abstract_Tree_Model
    314. Gtkada.Application
    315. Gtkada.Bindings
    316. Gtkada.Builder
    317. Gtkada.C
      1. Gtkada.C.Unbounded_Arrays
    318. Gtkada.Canvas
    319. Gtkada.Canvas_View
    320. Gtkada.Canvas_View.Astar
    321. Gtkada.Canvas_View.Links
    322. Gtkada.Canvas_View.Models
      1. Gtkada.Canvas_View.Models.Rtree_Models
    323. Gtkada.Canvas_View.Models.Layers
    324. Gtkada.Canvas_View.Objects
    325. Gtkada.Canvas_View.Rtrees
    326. Gtkada.Canvas_View.Views
    327. Gtkada.Dialogs
    328. Gtkada.File_Selection
    329. Gtkada.Handlers
    330. Gtkada.Intl
    331. Gtkada.MDI
      1. Gtkada.MDI.Desktop
    332. Gtkada.Multi_Paned
    333. Gtkada.Multiline_Entry
    334. Gtkada.Pixmaps
    335. Gtkada.Printing
    336. Gtkada.Stock_Icons
    337. Gtkada.Stock_Labels
    338. Gtkada.Style
    339. Gtkada.Types
    340. Pango
    341. Pango.Attributes
    342. Pango.Cairo
    343. Pango.Context
    344. Pango.Coverage
    345. Pango.Enums
    346. Pango.Font
    347. Pango.Font_Face
    348. Pango.Font_Family
    349. Pango.Font_Map
    350. Pango.Font_Metrics
    351. Pango.Fontset
      1. Pango.Fontset.Foreach_User_Data
    352. Pango.Language
    353. Pango.Layout
    354. Pango.Matrix
    355. Pango.Tabs
  2. Tagged Types

    1. Gdk.Device.Gdk_Device_Record
    2. Gdk.Device_Manager.Gdk_Device_Manager_Record
    3. Gdk.Device_Tool.Gdk_Device_Tool_Record
    4. Gdk.Display.Gdk_Display_Record
    5. Gdk.Drag_Contexts.Drag_Context_Record
    6. Gdk.Drawing_Context.Gdk_Drawing_Context_Record
    7. Gdk.Frame_Clock.Gdk_Frame_Clock_Record
    8. Gdk.Frame_Timings.Gdk_Frame_Timings
    9. Gdk.GLContext.Gdk_GLContext_Record
    10. Gdk.Monitor.Gdk_Monitor_Record
    11. Gdk.Pixbuf.Gdk_Pixbuf_Record
    12. Gdk.Screen.Gdk_Screen_Record
    13. Glib.Application.Gapplication_Command_Line_Record
    14. Glib.Application.Gapplication_Record
    15. Gdk.Seat.Gdk_Seat_Record
    16. Glib.C_Boxed
    17. Glib.Cancellable.Gcancellable_Record
    18. Glib.Graphs.Layouts.Base_Dummy_Vertex
    19. Glib.Graphs.Edge
    20. Glib.Graphs.Vertex
    21. Glib.Menu.Gmenu_Item_Record
    22. Glib.Menu.Gmenu_Record
    23. Glib.Menu_Model.Gmenu_Attribute_Iter_Record
    24. Glib.Menu_Model.Gmenu_Link_Iter_Record
    25. Glib.Menu_Model.Gmenu_Model_Record
    26. Glib.Object.GObject_Record
    27. Glib.Notification.Gnotification_Record
    28. Glib.Object.G_Binding_Record
    29. Glib.Option.Goption_Context
    30. Glib.Simple_Action.Gsimple_Action_Record
    31. Glib.Simple_Action_Group.Gsimple_Action_Group_Record
    32. Glib.Variant.Gvariant
    33. Gtk.About_Dialog.Gtk_About_Dialog_Record
    34. Gtk.Accel_Group.Gtk_Accel_Group_Record
    35. Gtk.Accel_Label.Gtk_Accel_Label_Record
    36. Gtk.Accel_Map.Gtk_Accel_Map_Record
    37. Gtk.Action.Gtk_Action_Record
    38. Gtk.Action_Bar.Gtk_Action_Bar_Record
    39. Gtk.Action_Group.Gtk_Action_Group_Record
    40. Gtk.Adjustment.Gtk_Adjustment_Record
    41. Gtk.Alignment.Gtk_Alignment_Record
    42. Gtk.Application.Gtk_Application_Record
    43. Gtk.Application_Window.Gtk_Application_Window_Record
    44. Gtk.Arrow.Gtk_Arrow_Record
    45. Gtk.Aspect_Frame.Gtk_Aspect_Frame_Record
    46. Gtk.Assistant.Gtk_Assistant_Record
    47. Gtk.Bin.Gtk_Bin_Record
    48. Gtk.Box.Gtk_Box_Record
    49. Gtk.Builder.Gtk_Builder_Record
    50. Gtk.Button.Gtk_Button_Record
    51. Gtk.Button_Box.Gtk_Button_Box_Record
    52. Gtk.Calendar.Gtk_Calendar_Record
    53. Gtk.Cell_Area.Gtk_Cell_Area_Record
    54. Gtk.Cell_Area_Box.Gtk_Cell_Area_Box_Record
    55. Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record
    56. Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record
    57. Gtk.Cell_Renderer_Accel.Gtk_Cell_Renderer_Accel_Record
    58. Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo_Record
    59. Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf_Record
    60. Gtk.Cell_Renderer_Progress.Gtk_Cell_Renderer_Progress_Record
    61. Gtk.Cell_Renderer_Spin.Gtk_Cell_Renderer_Spin_Record
    62. Gtk.Cell_Renderer_Spinner.Gtk_Cell_Renderer_Spinner_Record
    63. Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text_Record
    64. Gtk.Cell_Renderer_Toggle.Gtk_Cell_Renderer_Toggle_Record
    65. Gtk.Cell_View.Gtk_Cell_View_Record
    66. Gtk.Check_Button.Gtk_Check_Button_Record
    67. Gtk.Check_Menu_Item.Gtk_Check_Menu_Item_Record
    68. Gtk.Clipboard.Gtk_Clipboard_Record
    69. Gtk.Color_Button.Gtk_Color_Button_Record
    70. Gtk.Color_Chooser_Dialog.Gtk_Color_Chooser_Dialog_Record
    71. Gtk.Color_Chooser_Widget.Gtk_Color_Chooser_Widget_Record
    72. Gtk.Color_Selection.Gtk_Color_Selection_Record
    73. Gtk.Color_Selection_Dialog.Gtk_Color_Selection_Dialog_Record
    74. Gtk.Combo_Box.Gtk_Combo_Box_Record
    75. Gtk.Combo_Box_Text.Gtk_Combo_Box_Text_Record
    76. Gtk.Container.Gtk_Container_Record
    77. Gtk.Css_Provider.Gtk_Css_Provider_Record
    78. Gtk.Css_Section.Gtk_Css_Section
    79. Gtk.Dialog.Gtk_Dialog_Record
    80. Gtk.Drawing_Area.Gtk_Drawing_Area_Record
    81. Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record
    82. Gtk.Entry_Completion.Gtk_Entry_Completion_Record
    83. Gtk.Event_Box.Gtk_Event_Box_Record
    84. Gtk.Event_Controller.Gtk_Event_Controller_Record
    85. Gtk.Expander.Gtk_Expander_Record
    86. Gtk.File_Chooser_Button.Gtk_File_Chooser_Button_Record
    87. Gtk.File_Chooser_Dialog.Gtk_File_Chooser_Dialog_Record
    88. Gtk.File_Chooser_Widget.Gtk_File_Chooser_Widget_Record
    89. Gtk.File_Filter.Gtk_File_Filter_Record
    90. Gtk.Fixed.Gtk_Fixed_Record
    91. Gtk.Flow_Box.Gtk_Flow_Box_Record
    92. Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record
    93. Gtk.Font_Button.Gtk_Font_Button_Record
    94. Gtk.Font_Chooser_Dialog.Gtk_Font_Chooser_Dialog_Record
    95. Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget_Record
    96. Gtk.Font_Selection.Gtk_Font_Selection_Record
    97. Gtk.Font_Selection_Dialog.Gtk_Font_Selection_Dialog_Record
    98. Gtk.Frame.Gtk_Frame_Record
    99. Gtk.GLArea.Gtk_GLArea_Record
    100. Gtk.GRange.Gtk_Range_Record
    101. Gtk.GEntry.Gtk_Entry_Record
    102. Gtk.Gesture.Gtk_Gesture_Record
    103. Gtk.Gesture_Drag.Gtk_Gesture_Drag_Record
    104. Gtk.Gesture_Long_Press.Gtk_Gesture_Long_Press_Record
    105. Gtk.Gesture_Multi_Press.Gtk_Gesture_Multi_Press_Record
    106. Gtk.Gesture_Pan.Gtk_Gesture_Pan_Record
    107. Gtk.Gesture_Rotate.Gtk_Gesture_Rotate_Record
    108. Gtk.Gesture_Single.Gtk_Gesture_Single_Record
    109. Gtk.Gesture_Swipe.Gtk_Gesture_Swipe_Record
    110. Gtk.Gesture_Zoom.Gtk_Gesture_Zoom_Record
    111. Gtk.Gradient.Gtk_Gradient
    112. Gtk.Grid.Gtk_Grid_Record
    113. Gtk.Handle_Box.Gtk_Handle_Box_Record
    114. Gtk.Hbutton_Box.Gtk_Hbutton_Box_Record
    115. Gtk.Header_Bar.Gtk_Header_Bar_Record
    116. Gtk.IM_Context.Gtk_IM_Context_Record
    117. Gtk.IM_Context_Simple.Gtk_IM_Context_Simple_Record
    118. Gtk.IM_Multi_Context.Gtk_IM_Multi_Context_Record
    119. Gtk.Hsv.Gtk_Hsv_Record
    120. Gtk.Icon_Factory.Gtk_Icon_Factory_Record
    121. Gtk.Icon_Set.Gtk_Icon_Set
    122. Gtk.Icon_Source.Gtk_Icon_Source
    123. Gtk.Icon_Theme.Gtk_Icon_Info_Record
    124. Gtk.Icon_Theme.Gtk_Icon_Theme_Record
    125. Gtk.Icon_View.Gtk_Icon_View_Record
    126. Gtk.Image.Gtk_Image_Record
    127. Gtk.Image_Menu_Item.Gtk_Image_Menu_Item_Record
    128. Gtk.Info_Bar.Gtk_Info_Bar_Record
    129. Gtk.Invisible.Gtk_Invisible_Record
    130. Gtk.Label.Gtk_Label_Record
    131. Gtk.Layout.Gtk_Layout_Record
    132. Gtk.Level_Bar.Gtk_Level_Bar_Record
    133. Gtk.Link_Button.Gtk_Link_Button_Record
    134. Gtk.List_Box.Gtk_List_Box_Record
    135. Gtk.List_Box_Row.Gtk_List_Box_Row_Record
    136. Gtk.List_Store.Gtk_List_Store_Record
    137. Gtk.Menu.Gtk_Menu_Record
    138. Gtk.Menu_Bar.Gtk_Menu_Bar_Record
    139. Gtk.Menu_Button.Gtk_Menu_Button_Record
    140. Gtk.Menu_Item.Gtk_Menu_Item_Record
    141. Gtk.Menu_Shell.Gtk_Menu_Shell_Record
    142. Gtk.Menu_Tool_Button.Gtk_Menu_Tool_Button_Record
    143. Gtk.Message_Dialog.Gtk_Message_Dialog_Record
    144. Gtk.Misc.Gtk_Misc_Record
    145. Gtk.Notebook.Gtk_Notebook_Record
    146. Gtk.Offscreen_Window.Gtk_Offscreen_Window_Record
    147. Gtk.Overlay.Gtk_Overlay_Record
    148. Gtk.Page_Setup.Gtk_Page_Setup_Record
    149. Gtk.Paned.Gtk_Paned_Record
    150. Gtk.Paper_Size.Gtk_Paper_Size
    151. Gtk.Popover.Gtk_Popover_Record
    152. Gtk.Print_Context.Gtk_Print_Context_Record
    153. Gtk.Print_Operation.Gtk_Print_Operation_Record
    154. Gtk.Print_Settings.Gtk_Print_Settings_Record
    155. Gtk.Progress_Bar.Gtk_Progress_Bar_Record
    156. Gtk.Radio_Action.Gtk_Radio_Action_Record
    157. Gtk.Radio_Button.Gtk_Radio_Button_Record
    158. Gtk.Radio_Menu_Item.Gtk_Radio_Menu_Item_Record
    159. Gtk.Radio_Tool_Button.Gtk_Radio_Tool_Button_Record
    160. Gtk.Recent_Action.Gtk_Recent_Action_Record
    161. Gtk.Recent_Chooser_Dialog.Gtk_Recent_Chooser_Dialog_Record
    162. Gtk.Recent_Chooser_Menu.Gtk_Recent_Chooser_Menu_Record
    163. Gtk.Recent_Chooser_Widget.Gtk_Recent_Chooser_Widget_Record
    164. Gtk.Recent_Filter.Gtk_Recent_Filter_Record
    165. Gtk.Recent_Info.Gtk_Recent_Info
    166. Gtk.Recent_Manager.Gtk_Recent_Manager_Record
    167. Gtk.Revealer.Gtk_Revealer_Record
    168. Gtk.Scale.Gtk_Scale_Record
    169. Gtk.Scale_Button.Gtk_Scale_Button_Record
    170. Gtk.Scrollbar.Gtk_Scrollbar_Record
    171. Gtk.Scrolled_Window.Gtk_Scrolled_Window_Record
    172. Gtk.Search_Bar.Gtk_Search_Bar_Record
    173. Gtk.Search_Entry.Gtk_Search_Entry_Record
    174. Gtk.Selection_Data.Gtk_Selection_Data
    175. Gtk.Separator.Gtk_Separator_Record
    176. Gtk.Separator_Menu_Item.Gtk_Separator_Menu_Item_Record
    177. Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item_Record
    178. Gtk.Settings.Gtk_Settings_Record
    179. Gtk.Shortcuts_Window.Gtk_Shortcuts_Window_Record
    180. Gtk.Size_Group.Gtk_Size_Group_Record
    181. Gtk.Spin_Button.Gtk_Spin_Button_Record
    182. Gtk.Spinner.Gtk_Spinner_Record
    183. Gtk.Stack.Gtk_Stack_Record
    184. Gtk.Stack_Switcher.Gtk_Stack_Switcher_Record
    185. Gtk.Status_Bar.Gtk_Status_Bar_Record
    186. Gtk.Status_Icon.Gtk_Status_Icon_Record
    187. Gtk.Style.Gtk_Style_Record
    188. Gtk.Style_Context.Gtk_Style_Context_Record
    189. Gtk.Style_Properties.Gtk_Style_Properties_Record
    190. Gtk.Switch.Gtk_Switch_Record
    191. Gtk.Symbolic_Color.Gtk_Symbolic_Color
    192. Gtk.Table.Gtk_Table_Record
    193. Gtk.Target_List.Gtk_Target_List
    194. Gtk.Tearoff_Menu_Item.Gtk_Tearoff_Menu_Item_Record
    195. Gtk.Text_Buffer.Gtk_Text_Buffer_Record
    196. Gtk.Text_Child.Gtk_Text_Child_Anchor_Record
    197. Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record
    198. Gtk.Text_Mark.Gtk_Text_Mark_Record
    199. Gtk.Text_Tag.Gtk_Text_Tag_Record
    200. Gtk.Text_Tag_Table.Gtk_Text_Tag_Table_Record
    201. Gtk.Text_View.Gtk_Text_View_Record
    202. Gtk.Theming_Engine.Gtk_Theming_Engine_Record
    203. Gtk.Toggle_Action.Gtk_Toggle_Action_Record
    204. Gtk.Toggle_Button.Gtk_Toggle_Button_Record
    205. Gtk.Toggle_Tool_Button.Gtk_Toggle_Tool_Button_Record
    206. Gtk.Tool_Button.Gtk_Tool_Button_Record
    207. Gtk.Tool_Item.Gtk_Tool_Item_Record
    208. Gtk.Tool_Item_Group.Gtk_Tool_Item_Group_Record
    209. Gtk.Tool_Palette.Gtk_Tool_Palette_Record
    210. Gtk.Toolbar.Gtk_Toolbar_Record
    211. Gtk.Tooltip.Gtk_Tooltip_Record
    212. Gtk.Tree_Model.Gtk_Root_Tree_Model_Record
    213. Gtk.Tree_Model.Gtk_Tree_Path
    214. Gtk.Tree_Model_Filter.Gtk_Tree_Model_Filter_Record
    215. Gtk.Tree_Model_Sort.Gtk_Tree_Model_Sort_Record
    216. Gtk.Tree_Row_Reference.Gtk_Tree_Row_Reference
    217. Gtk.Tree_Selection.Gtk_Tree_Selection_Record
    218. Gtk.Tree_Store.Gtk_Tree_Store_Record
    219. Gtk.Tree_View.Gtk_Tree_View_Record
    220. Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record
    221. Gtk.UI_Manager.Gtk_UI_Manager_Record
    222. Gtk.Vbutton_Box.Gtk_Vbutton_Box_Record
    223. Gtk.Viewport.Gtk_Viewport_Record
    224. Gtk.Volume_Button.Gtk_Volume_Button_Record
    225. Gtk.Widget.Gtk_Widget_Record
    226. Gtk.Window.Gtk_Window_Group_Record
    227. Gtk.Window.Gtk_Window_Record
    228. Gtkada.Abstract_List_Model.Gtk_Abstract_List_Model_Record
    229. Gtkada.Abstract_Tree_Model.Gtk_Abstract_Tree_Model_Record
    230. Gtkada.Application.Gtkada_Application_Record
    231. Gtkada.Builder.Gtkada_Builder_Record
    232. Gtkada.Canvas.Buffered_Item_Record
    233. Gtkada.Canvas.Canvas_Item_Record
    234. Gtkada.Canvas.Canvas_Link_Record
    235. Gtkada.Canvas_View.Abstract_Item_Record
    236. Gtkada.Canvas.Interactive_Canvas_Record
    237. Gtkada.Canvas_View.Canvas_Item_Record
    238. Gtkada.Canvas_View.Canvas_Link_Record
    239. Gtkada.Canvas_View.Canvas_Model_Record
    240. Gtkada.Canvas_View.Canvas_View_Record
    241. Gtkada.Canvas_View.Container_Item_Record
    242. Gtkada.Canvas_View.Editable_Text_Item_Record
    243. Gtkada.Canvas_View.Ellipse_Item_Record
    244. Gtkada.Canvas_View.Hr_Item_Record
    245. Gtkada.Canvas_View.Image_Item_Record
    246. Gtkada.Canvas_View.Models.Rtree_Models.Rtree_Model_Record
    247. Gtkada.Canvas_View.List_Canvas_Model_Record
    248. Gtkada.Canvas_View.Polyline_Item_Record
    249. Gtkada.Canvas_View.Rtrees.Rtree
    250. Gtkada.Canvas_View.Rect_Item_Record
    251. Gtkada.Canvas_View.Text_Item_Record
    252. Gtkada.Canvas_View.Views.Animator
    253. Gtkada.Canvas_View.Views.Minimap_View_Record
    254. Gtkada.MDI.MDI_Child_Record
    255. Gtkada.MDI.MDI_Window_Record
    256. Gtkada.Multi_Paned.Gtkada_Multi_Paned_Record
    257. Gtkada.Multiline_Entry.Gtkada_Multiline_Entry_Record
    258. Gtkada.Printing.Gtkada_Print_Operation_Record
    259. Gtkada.Style.Drawing_Style
    260. Pango.Attributes.Pango_Attr_List
    261. Pango.Context.Pango_Context_Record
    262. Pango.Coverage.Pango_Coverage_Record
    263. Pango.Font.Pango_Font_Record
    264. Pango.Font_Face.Pango_Font_Face_Record
    265. Pango.Font_Family.Pango_Font_Family_Record
    266. Pango.Font_Map.Pango_Font_Map_Record
    267. Pango.Font_Metrics.Pango_Font_Metrics
    268. Pango.Fontset.Pango_Fontset_Record
    269. Pango.Language.Pango_Language
    270. Pango.Layout.Pango_Layout_Iter
    271. Pango.Layout.Pango_Layout_Record
    272. Pango.Tabs.Pango_Tab_Array

Gtkada.Canvas

Description

NOTE: this package is deprecated - prefer GtkAda.Canvas_View.

This package provides an interactive canvas, on which the user can put items, move them with the mouse, etc. The items can be connected together, and the connections remain active while the items are moved.

It also supports scrolling if put in a Gtk_Scrolled_Window. The canvas will be scrolled (and the selected items moved) if an item is selected and the mouse is dragged on a small area on the side of the canvas or even directly outside of the canvas. Scrolling will continue until the mouse is either released or moved back inside the canvas.

The scrolling speed will slightly increase over time if the mouse is kept outside of the canvas. This makes the canvas much more comfortable to use for the user.

All items put in this canvas must inherit from the type Canvas_Item_Record. However, it is your responsability, as a programmer, to provide drawing routines. In fact, all these items should draw in a pixmap, which is then copied automatically to the screen whenever the canvas needs to redraw itself.

The items can also react to mouse events: mouse clicks are transmitted to the item if the mouse did not move more than a given amount of pixels. To decide what their reaction should be, you should override the On_Button_Click subprogram.

This canvas is not intended for cases where you want to put hundreds of items on the screen. For instance, it does not provide any smart double-buffering other than the one provided by gtk+ itself, and thus you would get some flicker if there are too many items.

There are three coordinate systems used by widget. All the subprograms expect a specific coordinate system as input or output. Here are the three systems:

Items are selected automatically when they are clicked. If Control is pressed at the same time, multiple items can be selected. If the background is clicked (and control is not pressed), then all items are unselected. Pressing and dragging the mouse in the backgroudn draws a virtual box on the screen. All the items fully included in this box when it is released will be selected (this will replace the current selection if Control was not pressed).

<group>Drawing</group> <testgtk>create_canvas.adb</testgtk> <screenshot>gtkada-canvas</screenshot>

Add_Link

procedure Add_Link
  (Canvas : access Interactive_Canvas_Record;
   Link   : access Canvas_Link_Record'Class;
   Src    : access Canvas_Item_Record'Class;
   Dest   : access Canvas_Item_Record'Class;
   Arrow  : Arrow_Type := End_Arrow;
   Descr  : Glib.UTF8_String := "")

Add Link in the canvas. This connects the two items Src and Dest. Simpler procedure to add a standard link. This takes care of memory allocation, as well as adding the link to the canvas.

Parameters
Canvas
Link
Src
Dest
Arrow
Descr

Add_To_Selection

procedure Add_To_Selection
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

Add Item to the selection. This is only meaningful during a drag operation (ie during a button press and the matching button release). Item will be moved at the same time that the selection is moved. Item is not added again if it is already in the selection. This function can be called from the Button_Click subprogram to force moving items. This emits the "item_selected" signal.

Parameters
Canvas
Item

Align_Item

procedure Align_Item
  (Canvas  : access Interactive_Canvas_Record;
   Item    : access Canvas_Item_Record'Class;
   X_Align : Float := 0.5;
   Y_Align : Float := 0.5)

Scroll the canvas so that the Item appears at the given location in the canvas. If X_Align is 0.0, the item is align on the left. With 0.5, it is centered horizontally. If 1.0, it is aligned on the right.

Parameters
Canvas
Item
X_Align
Y_Align

Align_On_Grid

procedure Align_On_Grid
  (Canvas : access Interactive_Canvas_Record;
   Align  : Boolean := True)

Choose whether the items should be aligned on the grid when moved. Existing items are not moved even if you set this parameter to True, this will only take effect the next time the items are moved.

Parameters
Canvas
Align

Arrow_Type

type Arrow_Type is
  (No_Arrow,
   Start_Arrow,
   End_Arrow,
   Both_Arrow
  );

Indicate whether the links have an arrow or not.

Enumeration Literal
No_Arrow

the link does not have an arrow

Start_Arrow

the link has an arrow at its beginning

End_Arrow

the link has an arrow at the end

Both_Arrow

Buffered_Item

type Buffered_Item is access all Buffered_Item_Record'Class;

A widget that has a double-buffer associated. You should use this one when drawing items can take a long time, or you do not want to handle the zoom yourself. You only need to update the contents of the double pixmap when the contents of the item changes, since all the drawing and zooming is taken care of automatically. Once the drawing is done, call Item_Updated to force the canvas to refresh the screen. This buffered_item is meant to handle rectangular items. However, it can be used for polygonal items by overriding Draw. The new version should set the clip mask for the GC, then call Draw for the buffered item, and finally reset the clip mask. The clip mask must take into account the current zoom level.

Buffered_Item_Record

type Buffered_Item_Record is new Canvas_Item_Record with private;

A widget that has a double-buffer associated. You should use this one when drawing items can take a long time, or you do not want to handle the zoom yourself. You only need to update the contents of the double pixmap when the contents of the item changes, since all the drawing and zooming is taken care of automatically. Once the drawing is done, call Item_Updated to force the canvas to refresh the screen. This buffered_item is meant to handle rectangular items. However, it can be used for polygonal items by overriding Draw. The new version should set the clip mask for the GC, then call Draw for the buffered item, and finally reset the clip mask. The clip mask must take into account the current zoom level.

Canvas

function Canvas
  (Item : access Canvas_Item_Record) return Interactive_Canvas

Retrieve the canvas this item is attached to, or null if it does not belong to a canvas.

Parameters
Item
Return Value

Canvas_Item

type Canvas_Item is access all Canvas_Item_Record'Class;

An item that can be put on the canvas. This is an abstract type, as it does not provide any default drawing routine. You must override the abstract Draw subprogram.

Canvas_Item_Record

type Canvas_Item_Record is abstract new Glib.Graphs.Vertex with private;

An item that can be put on the canvas. This is an abstract type, as it does not provide any default drawing routine. You must override the abstract Draw subprogram.

Canvas_Link

type Canvas_Link is access all Canvas_Link_Record'Class;

A link between two items in the canvas. The implementation provided in this package provides links that can be either straight links or curved links. This type is provided as a tagged type so that you can associated your own user data with it.

Canvas_Link_Access

type Canvas_Link_Access is access all Canvas_Link_Record;

A link between two items in the canvas. The implementation provided in this package provides links that can be either straight links or curved links. This type is provided as a tagged type so that you can associated your own user data with it.

Canvas_Link_Record

type Canvas_Link_Record is new Glib.Graphs.Edge with private;

A link between two items in the canvas. The implementation provided in this package provides links that can be either straight links or curved links. This type is provided as a tagged type so that you can associated your own user data with it.

Clear

procedure Clear (Canvas : access Interactive_Canvas_Record)

Remove all items from the canvas

Parameters
Canvas

Clear_Selection

procedure Clear_Selection (Canvas : access Interactive_Canvas_Record)

Clear the list of currently selected items.

Parameters
Canvas

Clip_Line

procedure Clip_Line
  (Src   : access Canvas_Item_Record;
   Canvas : access Interactive_Canvas_Record'Class;
   To_X  : Glib.Gint;
   To_Y  : Glib.Gint;
   X_Pos : Glib.Gfloat;
   Y_Pos : Glib.Gfloat;
   Side  : out Item_Side;
   X_Out : out Glib.Gint;
   Y_Out : out Glib.Gint)

Clip the line that goes from Src at pos (X_Pos, Y_Pos) to (To_X, To_Y) in world coordinates. The intersection between that line and the border of Rect is returned in (X_Out, Y_Out). The result should be in world coordinates. X_Pos and Y_Pos have the same meaning as Src_X_Pos and Src_Y_Pos in the link record. This procedure is called when computing the position for the links within the default Draw_Link procedure. The default implementation only works with rectangular items. The computed coordinates are then passed on directly to Draw_Straight_Line.

Parameters
Src
Canvas
To_X
To_Y
X_Pos
Y_Pos
Side
X_Out
Y_Out

Configure

procedure Configure
  (Link  : access Canvas_Link_Record;
   Arrow : Arrow_Type := End_Arrow;
   Descr : Glib.UTF8_String := "")

Configure a link. The link is an oriented bound between two items on the canvas. If Descr is not the empty string, it will be displayed in the middle of the link, and should indicate what the link means. Arrow indicates whether some arrows should be printed as well.

Parameters
Link
Arrow
Descr

Configure

procedure Configure
  (Canvas : access Interactive_Canvas_Record;
   Grid_Size        : Glib.Guint := Default_Grid_Size;
   Annotation_Font  : Pango.Font.Pango_Font_Description :=
                        Pango.Font.From_String (Default_Annotation_Font);
   Arc_Link_Offset  : Glib.Gint := Default_Arc_Link_Offset;
   Arrow_Angle      : Glib.Gint := Default_Arrow_Angle;
   Arrow_Length     : Glib.Gint := Default_Arrow_Length;
   Motion_Threshold : Glib.Gdouble := Default_Motion_Threshold;
   Background       : Gdk.RGBA.Gdk_RGBA := Gdk.RGBA.White_RGBA)

Change the parameters for the canvas. A Grid_Size of 0 means than no grid should be drawn in the background of canvas. Note that in that case you can never activate Align_On_Grid. This setting doesn't apply if you have redefined Draw_Background, which may not draw a grid.

Parameters
Canvas
Grid_Size
Annotation_Font
Arc_Link_Offset
Arrow_Angle
Arrow_Length
Motion_Threshold
Background

Default_Annotation_Font

Default_Annotation_Font  : constant String := "Helvetica 8";

Font used when displaying link annotation. See Pango.Font for the format.

Default_Arc_Link_Offset

Default_Arc_Link_Offset  : constant := 25;

Distance between two parallel arcs for two links. This is not the exact distance, and it only used to compute the control points for the bezier curves.

Default_Arrow_Angle

Default_Arrow_Angle      : constant := 30;

Half angle for the arrows in degres

Default_Arrow_Length

Default_Arrow_Length     : constant := 6;

Length of the arrows in pixels.

Default_Grid_Size

Default_Grid_Size        : constant := 15;

Number of pixels between two dots on the grid. This is used for both horizontal and vertical orientation.

Default_Layout_Algorithm

procedure Default_Layout_Algorithm
  (Canvas          : access Interactive_Canvas_Record'Class;
   Graph           : Glib.Graphs.Graph;
   Force           : Boolean;
   Vertical_Layout : Boolean)

The default algorithm used in the canvas. Basically, items are put next to each other, unless there is a link between two items. In that case, the second item is put below the first, as space allows.

Parameters
Canvas
Graph
Force
Vertical_Layout

Default_Motion_Threshold

Default_Motion_Threshold : constant := 4.0;

Mimimum motion the mouse must have before we start moving the selected item. If the mouse has moved less than that amount of pixels in any direction, then the mouse click is considered as being a selection only and is transfered to the item itself. This is in screen coordinates

Destroy

procedure Destroy (Item : in out Canvas_Item_Record)

Free the memory occupied by the item (not the item itself). You should override this function if you define your own widget type, but always call the parent's Destroy subprogram.

Parameters
Item

Destroy

procedure Destroy (Link : in out Canvas_Link_Record)

Method called every time a link is destroyed. You should override this if you define your own link types. Note that the link might already have been removed from the canvas when this subprogram is called. This shouldn't free the link itself, only its fields.

Parameters
Link

Draw

procedure Draw
  (Item : access Canvas_Item_Record;
   Cr   : Cairo.Cairo_Context)

This subprogram, that must be overridden, should draw the item on Cr. The Item is drawn from coordinates (0,0), and does not need to take care of the zoom level. If you need to change the contents of the item, you should call Item_Updated after having done the drawing.

Parameters
Item
Cr

Draw_All

procedure Draw_All
  (Canvas : access Interactive_Canvas_Record'Class;
   Cr     : Cairo.Cairo_Context)

Draws the whole canvas in Cr. Useful to print the canvas on an SVG or PNG surface.

Parameters
Canvas
Cr

Draw_Area

procedure Draw_Area
  (Canvas : access Interactive_Canvas_Record'Class;
   Rect   : Cairo.Region.Cairo_Rectangle_Int)

Draw in Canvas the specified area.

Parameters
Canvas
Rect

Draw_Background

procedure Draw_Background
  (Canvas : access Interactive_Canvas_Record;
   Cr     : Cairo.Cairo_Context)

Draw the background of the canvas. This procedure should be overridden if you want to draw something else on the background. It must first clear the area on the screen.

The default implementation draws a grid.

An example implementation that draws a background image is shown at the end of this file.

Parameters
Canvas
Cr

Draw_Grid

procedure Draw_Grid
  (Canvas : access Interactive_Canvas_Record;
   Cr     : Cairo.Cairo_Context)

Helper function that can be called from Draw_Background. It cannot be used directly as Draw_Background, since it doesn't clear the area first.

Parameters
Canvas
Cr

Draw_Link

procedure Draw_Link
  (Canvas      : access Interactive_Canvas_Record'Class;
   Link        : access Canvas_Link_Record;
   Cr          : Cairo.Cairo_Context;
   Edge_Number : Glib.Gint;
   Show_Annotation : Boolean := True)

Redraw the link on the canvas. Note that this is a primitive procedure of Link, not of Canvas, and thus can easily be overrided for specific links. The default version draws either straight or arc links (the latter when there are multiple links between two given items). This function shouldn't be called if one of the two ends of the link is invisible.

Cr is the Cairo_Context that is used to draw the link. The link is drawn using the current cairo brush, so if you need to specify some particular color, you can do it directly in the Cairo_Context

Edge_Number indicates the index of link in the list of links that join the same source to the same destination. It should be used so that two links do not overlap (for instance, the default is to draw the first link straight, and the others as arcs).

Parameters
Canvas
Link
Cr
Edge_Number
Show_Annotation

Draw_Selected

procedure Draw_Selected
  (Item : access Canvas_Item_Record;
   Cr   : Cairo.Cairo_Context)

Draws a selected item. By default, this adds a semi-transparent overlay above the item, drawn using the below call to Draw

Parameters
Item
Cr

Draw_Straight_Line

procedure Draw_Straight_Line
  (Link      : access Canvas_Link_Record;
   Cr        : Cairo.Cairo_Context;
   Src_Side  : Item_Side;
   X1, Y1    : Glib.Gdouble;
   Dest_Side : Item_Side;
   X2, Y2    : Glib.Gdouble)

Draw a straight link between two points. This could be overridden if you need to draw an something along the link. The links goes from (Src, X1, Y1) to (Dest, X2, Y2), in canvas coordinates. The coordinates have already been clipped so that they do not override the item.

Parameters
Link
Cr
Src_Side
X1
Y1
Dest_Side
X2
Y2

For_Each_Item

procedure For_Each_Item
  (Canvas            : access Interactive_Canvas_Record;
   Execute           : Item_Processor;
   Linked_From_Or_To : Canvas_Item := null)

Execute an action on each of the items contained in the canvas. If Execute returns False, we stop traversing the list of children. It is safe to remove the items in Item_Processor.

If Linked_From_Or_To is not null, then only the items linked to this one will be processed. It is possible that a given item will be returned twice, if it is both linked to and from the item.

Parameters
Canvas
Execute
Linked_From_Or_To

For_Each_Link

procedure For_Each_Link
  (Canvas   : access Interactive_Canvas_Record;
   Execute  : Link_Processor;
   From, To : Canvas_Item := null)

Execute an action on each of the links contained in the canvas. If Execute returns False, we stop traversing the list of links. It is safe to remove the link from the list in Link_Processor.

(From, To) can be used to limit what links are looked for.

??? Would be nicer to give direct access to the Graph iterators

Parameters
Canvas
Execute
From
To

Get

function Get (Iter : Item_Iterator) return Canvas_Item

Return the item pointed to by the iterator. null is returned when there are no more item in the canvas.

Parameters
Iter
Return Value

Get_Align_On_Grid

function Get_Align_On_Grid
  (Canvas : access Interactive_Canvas_Record) return Boolean

Return True if items are currently aligned on grid.

Parameters
Canvas
Return Value

Get_Arrow_Angle

function Get_Arrow_Angle
  (Canvas : access Interactive_Canvas_Record'Class) return Glib.Gdouble

Return the angle of arrows in the canvas.

Parameters
Canvas
Return Value

Get_Arrow_Length

function Get_Arrow_Length
  (Canvas : access Interactive_Canvas_Record'Class) return Glib.Gint

Return the length of arrows in the canvas.

Parameters
Canvas
Return Value

Get_Arrow_Type

function Get_Arrow_Type
  (Link : access Canvas_Link_Record) return Arrow_Type

Return the location of the arrows on Link

Parameters
Link
Return Value

Get_Bounding_Box

procedure Get_Bounding_Box
  (Canvas : access Interactive_Canvas_Record'Class;
   Width  : out Glib.Gdouble;
   Height : out Glib.Gdouble)

Return the size occupied by the items drawn on the canvas.

Parameters
Canvas
Width
Height

Get_Coord

function Get_Coord
  (Item : access Canvas_Item_Record)
   return Cairo.Region.Cairo_Rectangle_Int

Return the coordinates and size of the bounding box for item, in world coordinates. If the item has never been resized, it initially has a width and height of 1.

Parameters
Item
Return Value

Get_Descr

function Get_Descr
  (Link : access Canvas_Link_Record) return Glib.UTF8_String

Return the description for the link, or "" if there is none

Parameters
Link
Return Value

Get_Dest_Pos

procedure Get_Dest_Pos
  (Link : access Canvas_Link_Record; X, Y : out Glib.Gfloat)

Return the attachment position of the link along its destination item

Parameters
Link
X
Y

Get_Hadj

function Get_Hadj
  (Canvas : access Interactive_Canvas_Record'Class)
   return Gtk.Adjustment.Gtk_Adjustment

Return the horizontal adjustment associated with Canva

Parameters
Canvas
Return Value

Get_Orthogonal_Links

function Get_Orthogonal_Links
  (Canvas : access Interactive_Canvas_Record) return Boolean

Return True if the links are only drawn horizontally and vertically.

Parameters
Canvas
Return Value

Get_Src_Pos

procedure Get_Src_Pos
  (Link : access Canvas_Link_Record; X, Y : out Glib.Gfloat)

Return the attachment position of the link along its source item

Parameters
Link
X
Y

Get_Type

function Get_Type return Glib.GType

Return the internal type

Return Value

Get_Vadj

function Get_Vadj
  (Canvas : access Interactive_Canvas_Record'Class)
   return Gtk.Adjustment.Gtk_Adjustment

Return the vertical adjustment associated with Canvas

Parameters
Canvas
Return Value

Get_World_Coordinates

procedure Get_World_Coordinates
  (Canvas : access Interactive_Canvas_Record'Class;
   X, Y   : out Glib.Gdouble;
   Width  : out Glib.Gdouble;
   Height : out Glib.Gdouble)

Return the world coordinates of Canvas.

Parameters
Canvas
X
Y
Width
Height

Get_Zoom

function Get_Zoom
  (Canvas : access Interactive_Canvas_Record) return Glib.Gdouble

Return the current zoom level

Parameters
Canvas
Return Value

Gtk_New

procedure Gtk_New
  (Canvas : out Interactive_Canvas; Auto_Layout : Boolean := True)

Create a new empty Canvas. If Auto_Layout is True, then the items are automatically positioned as they are put in the canvas, if no coordinates are specified.

Parameters
Canvas
Auto_Layout

Has_Link

function Has_Link
  (Canvas   : access Interactive_Canvas_Record;
   From, To : access Canvas_Item_Record'Class;
   Name     : Glib.UTF8_String := "") return Boolean

Test whether there is a link from From to To, with the same name. If Name is the empty string "", then no check is done on the name, and True if returned if there is any link between the two items.

Parameters
Canvas
From
To
Name
Return Value

Initialize

procedure Initialize
  (Canvas      : access Interactive_Canvas_Record'Class;
   Auto_Layout : Boolean := True)

Internal function used to initialize the canvas.

Parameters
Canvas
Auto_Layout

Interactive_Canvas

type Interactive_Canvas is access all Interactive_Canvas_Record'Class;

A canvas on which items are put. Each item can be moved interactively by the user, and links can be drawn automatically from an item to another. This widget can be inserted directly in a scrolled window to provide support for scrolling.

Interactive_Canvas_Record

type Interactive_Canvas_Record is new
  Gtk.Layout.Gtk_Layout_Record with private;

A canvas on which items are put. Each item can be moved interactively by the user, and links can be drawn automatically from an item to another. This widget can be inserted directly in a scrolled window to provide support for scrolling.

Is_From_Auto_Layout

function Is_From_Auto_Layout
  (Item : access Canvas_Item_Record) return Boolean

Return True if the current location of the item is the result from the auto layout algorithm. False is returned if the item was moved manually by the user.

Parameters
Item
Return Value

Is_Linked_From

function Is_Linked_From (Iter : Item_Iterator) return Boolean

Return True if there is a link from: Get (Iter) -> Linked_From_Or_To Linked_From_Or_To is the item passed to Start. False is returned if this item was null.

Parameters
Iter
Return Value

Is_On_Top

function Is_On_Top
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class) return Boolean

Return True if Item is displayed on top of all the others in the canvas.

Parameters
Canvas
Item
Return Value

Is_Selected

function Is_Selected
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class) return Boolean

Return True if the item is currently selected

Parameters
Canvas
Item
Return Value

Is_Visible

function Is_Visible (Item : access Canvas_Item_Record) return Boolean

Return True if the item is currently visible

Parameters
Item
Return Value

Item_At_Coordinates

function Item_At_Coordinates
  (Canvas : access Interactive_Canvas_Record; Event : Gdk.Event.Gdk_Event)
   return Canvas_Item

Same as above, but using the canvas coordinates of the event, taking into account the current zoom level and current scrolling

Parameters
Canvas
Event
Return Value

Item_At_Coordinates

function Item_At_Coordinates
  (Canvas : access Interactive_Canvas_Record;
   X, Y : Glib.Gint) return Canvas_Item

Return the item at world coordinates (X, Y) which is on top of all others. null is returned if there is no such item.

Parameters
Canvas
X
Y
Return Value

Item_At_Coordinates

procedure Item_At_Coordinates
  (Canvas : access Interactive_Canvas_Record;
   Event  : Gdk.Event.Gdk_Event;
   Item   : out Canvas_Item;
   X, Y   : out Glib.Gint)

Same as above, but also returns the coordinates (X, Y) within the item. The coordinates are not set if Item is null on exit.

Parameters
Canvas
Event
Item
X
Y

Item_Iterator

type Item_Iterator is private;

Item_Processor

type Item_Processor is access function
  (Canvas : access Interactive_Canvas_Record'Class;
   Item   : access Canvas_Item_Record'Class) return Boolean;
Parameters
Canvas
Item
Return Value

Item_Side

type Item_Side is (East, West, North, South);

Each side of an item, along its rectangle bounding box

Enumeration Literal
East
West
North
South

Item_Updated

procedure Item_Updated
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

This should be called when Item has changed the contents of its pixmap, and thus the Canvas should be updated.

Parameters
Canvas
Item

Layout

procedure Layout
  (Canvas : access Interactive_Canvas_Record;
   Force  : Boolean := False)

Recompute the layout of the canvas. Force can be used to control the layout algorithm, as described above for Layout_Algorithm.

Parameters
Canvas
Force

Layout_Algorithm

type Layout_Algorithm is access procedure
  (Canvas          : access Interactive_Canvas_Record'Class;
   Graph           : Glib.Graphs.Graph;
   Force           : Boolean;
   Vertical_Layout : Boolean);

A general layout algorithm. It should compute the position of all the vertices of the graph, and set them directly in the graph itself. Note: all the vertices in the graph are of type Canvas_Item_Record'Class and you should use that to set the coordinates through a call to Move_To.

Algorithms are encouraged to preserve the current layout as much as possible, taking into account items that have been moved manually by the user, so that the latter can preserver his mental map of the graph. However, if Force is set to True, then the whole layout should be recomputed as if all items had just been inserted.

Items that have just been inserted in the graph, but whose position has never been computed, are set at coordinates (Gint'First, Gint'First). Check the result of Get_Coord.

This function doesn't need to align items, this is done automatically by the canvas if necessary.

Parameters
Canvas
Graph
Force
Vertical_Layout

Link_Processor

type Link_Processor is access function
  (Canvas : access Interactive_Canvas_Record'Class;
   Link   : access Canvas_Link_Record'Class) return Boolean;
Parameters
Canvas
Link
Return Value

Lower_Item

procedure Lower_Item
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

Lower the item so that it is displayed below all the others. The canvas is refreshed as needed to reflect the change. Nothing happens if Item is not part of the canvas.

Parameters
Canvas
Item

Move_To

procedure Move_To
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class;
   X, Y   : Glib.Gint := Glib.Gint'First)

Move the item in the canvas, to world coordinates (X, Y). Item is assumed to be already in the canvas. If you leave both coordinates X and Y to their default value, then the item's location will be automatically computed when you layout the canvas (it is your responsability to call Layout).

Parameters
Canvas
Item
X
Y

Next

function Next (Iter : Item_Iterator) return Item_Iterator

Move the iterator to the next item. All items will eventually be returned if you do not add new items during the iteration and none are removed. However, it is safe to remove items at any time, except the current item

Parameters
Iter
Return Value

Next

procedure Next (Iter : in out Item_Iterator)

Move the iterator to the next item. All items will eventually be returned if you do not add new items during the iteration and none are removed. However, it is safe to remove items at any time, except the current item

Parameters
Iter

On_Button_Click

function On_Button_Click
  (Item  : access Canvas_Item_Record;
   Event : Gdk.Event.Gdk_Event_Button) return Boolean

Function called whenever mouse events occured. The following mouse events may be received: Mouse_Press, Motion_Notify (only once the mouse is pressed, and On_Button_Click returned True), Mouse_Release (only once the mouse is pressed, and On_Button_Click returned True), Returns whether the event was handled or not.

The coordinates (X, Y) in the Event are relative to the top-left corner of Item.

Parameters
Item
Event
Return Value

Point_In_Item

function Point_In_Item
  (Item : access Canvas_Item_Record;
   X, Y : Glib.Gint) return Boolean

This function should return True if (X, Y) is inside the item. X and Y are in world coordinates. This function is meant to be overridden for non-rectangular items, since the default behavior works for rectangular items. This function is never called for invisible items

Parameters
Item
X
Y
Return Value

Put

procedure Put
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class;
   X, Y   : Glib.Gint := Glib.Gint'First)

Add a new item to the canvas, at world coordinates (X, Y). The item is added at a specific location. If you leave both X and Y to their default value, the item's location will be computed automatically when you call Layout on the canvas, unless Auto_Layout has been set, in which case the position will be computed immediately.

Parameters
Canvas
Item
X
Y

Raise_Item

procedure Raise_Item
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

Raise the item so that it is displayed on top of all the others The canvas is refreshed as needed to reflect the change. Nothing happens if Item is not part of the canvas.

Parameters
Canvas
Item

Refresh

procedure Refresh
  (Self : not null access Interactive_Canvas_Record;
   Item : access Canvas_Item_Record'Class := null)

Refresh either the whole canvas, or just the area occupied by the item if it is specified.

Parameters
Self
Item

Refresh_Canvas

procedure Refresh_Canvas (Canvas : access Interactive_Canvas_Record)

Redraw the whole canvas (both in the double buffer and on the screen).

Parameters
Canvas

Remove

procedure Remove
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

Remove an item and all the links to and from it from the canvas. The item itself is not freed, but the links are. Nothing is done if the item is not part of the canvas.

Parameters
Canvas
Item

Remove_From_Selection

procedure Remove_From_Selection
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

Remove Item from the selection. This emits the "item_unselected" signal.

Parameters
Canvas
Item

Remove_Link

procedure Remove_Link
  (Canvas : access Interactive_Canvas_Record;
   Link   : access Canvas_Link_Record'Class)

Remove a link from the canvas. It also destroys the link itself, and free the memory allocated to it. Nothing is done if Link does not belong to canvas.

Parameters
Canvas
Link

Select_All

procedure Select_All (Canvas : access Interactive_Canvas_Record)

Select all the Item in the canvas.

Parameters
Canvas

Selected

procedure Selected
  (Item        : access Canvas_Item_Record;
   Canvas      : access Interactive_Canvas_Record'Class;
   Is_Selected : Boolean)

Called when the item is selected or unselected. The default is to do nothing.

Parameters
Item
Canvas
Is_Selected

Set_Auto_Layout

procedure Set_Auto_Layout
  (Canvas      : access Interactive_Canvas_Record;
   Auto_Layout : Boolean)

If Auto_Layout is true, then every time an item is inserted in the canvas, the layout algorithm is called. If set to False, it is the responsability of the caller to call Layout below to force a recomputation of the layout, preferably after inserting a number of items.

Parameters
Canvas
Auto_Layout

Set_Dest_Pos

procedure Set_Dest_Pos
  (Link : access Canvas_Link_Record; X_Pos, Y_Pos : Glib.Gfloat := 0.5)

Same as Set_Src_Pos for the destination item

Parameters
Link
X_Pos
Y_Pos

Set_Items

procedure Set_Items
  (Canvas : access Interactive_Canvas_Record;
   Items  : Glib.Graphs.Graph)

Set the items and links to display in the canvas from Items. All items previously in the canvas are removed, and replaced by the vertices in Items. Note that the vertices in Items must be in Canvas_Item_Record'Class, and the links must be in Canvas_Link_Record'Class. If you do not have an automatic layout set up in Canvas, you need to set the coordinates of all the vertices by calling Move_To separately.

You mustn't destroy items yourself, this is done automatically when the canvas is destroyed.

Parameters
Canvas
Items

Set_Layout_Algorithm

procedure Set_Layout_Algorithm
  (Canvas    : access Interactive_Canvas_Record;
   Algorithm : Layout_Algorithm)

Set the layout algorithm to use to compute the position of the items. Algorithm mustn't be null.

Parameters
Canvas
Algorithm

Set_Layout_Orientation

procedure Set_Layout_Orientation
  (Canvas          : access Interactive_Canvas_Record;
   Vertical_Layout : Boolean := False)

Specify the layout orientation to use for this canvas. The setting is passed as a parameter to the layout algorithm

Parameters
Canvas
Vertical_Layout

Set_Orthogonal_Links

procedure Set_Orthogonal_Links
  (Canvas : access Interactive_Canvas_Record;
   Orthogonal : Boolean)

If Orthogonal is True, then all the links will be drawn only with vertical and horizontal lines. This is not applied for the second or more link between two items.

Parameters
Canvas
Orthogonal

Set_Screen_Size

procedure Set_Screen_Size
  (Item   : access Canvas_Item_Record;
   Width  : Glib.Gint;
   Height : Glib.Gint)

Set the size of bounding box for the item in world coordinates. The item itself needn't occupy the whole area of this bounding box, see Point_In_Item. You need to redraw the item, and call Item_Updated to force the canvas to refresh the screen.

Parameters
Item
Width
Height

Set_Src_Pos

procedure Set_Src_Pos
  (Link : access Canvas_Link_Record; X_Pos, Y_Pos : Glib.Gfloat := 0.5)

Set the position of the link's attachment in its source item. X_Pos and Y_Pos should be given between 0.0 and 1.0 (from left to right or top to bottom).. By default, all links are considered to be attached to the center of items. However, in some cases it is more convenient to attach it to a specific part of the item. For instance, you can force a link to always start from the top of the item by setting Y_Pos to 0.0.

Parameters
Link
X_Pos
Y_Pos

Set_Visibility

procedure Set_Visibility
  (Item    : access Canvas_Item_Record;
   Visible : Boolean)

Set the visibility status of the item. An invisible item will not be visible on the screen, and will not take part in the computation of the the scrollbars for the canvas. The canvas is not refreshed (this is your responsibility to do it after you have finished doing all the modifications).

Parameters
Item
Visible

Show_Item

procedure Show_Item
  (Canvas : access Interactive_Canvas_Record;
   Item   : access Canvas_Item_Record'Class)

Scroll the canvas so that Item is visible. Nothing is done if the item is already visible

Parameters
Canvas
Item

Signal_Background_Click

Signal_Background_Click       : constant Glib.Signal_Name :=
                                  "background_click";

Signal_Item_Moved

Signal_Item_Moved             : constant Glib.Signal_Name :=
                                  "item_moved";

Signal_Item_Selected

Signal_Item_Selected          : constant Glib.Signal_Name :=
                                  "item_selected";

Signal_Item_Unselected

Signal_Item_Unselected        : constant Glib.Signal_Name :=
                                  "item_unselected";

Signal_Set_Scroll_Adjustments

Signal_Set_Scroll_Adjustments : constant Glib.Signal_Name :=
                                  "set_scroll_adjustments";

Signal_Zoomed

Signal_Zoomed                 : constant Glib.Signal_Name :=
                                  "zoomed";

Start

function Start
  (Canvas            : access Interactive_Canvas_Record;
   Linked_From_Or_To : Canvas_Item := null;
   Selected_Only     : Boolean := False) return Item_Iterator

Return the first item in the canvas. The same restriction as above applies if Linked_From_Or_To is not null.

Parameters
Canvas
Linked_From_Or_To
Selected_Only
Return Value

Surface

function Surface (Item : access Buffered_Item_Record)
   return Cairo.Cairo_Surface

Return the double-buffer.

Parameters
Item
Return Value

Update_Links

procedure Update_Links
  (Canvas         : access Interactive_Canvas_Record;
   Cr             : Cairo.Cairo_Context;
   Invert_Mode    : Boolean;
   From_Selection : Boolean)

Redraw all the links in the canvas, after the items have been laid out.

If From_Selection is true, then only the links to or from one of the selected items need to be drawn.

Parameters
Canvas
Cr
Invert_Mode
From_Selection

Zoom

procedure Zoom
  (Canvas  : access Interactive_Canvas_Record;
   Percent : Glib.Gdouble := 1.0;
   Length  : Duration := 0.0)

Zoom in or out in the canvas.

Length is the length of the zooming animation.

Note that one possible use for this function is to refresh the canvas and emit the "zoomed" signal, which might redraw all the items. This can be accomplished by keeping the default 1.0 value for Percent.

Parameters
Canvas
Percent
Length

Simple Types

Tagged Types

Access Types

Constants

Subprograms