/src/wrappers/gtk/library/gtk_tree_view_column.e

http://github.com/tybor/Liberty · Specman e · 822 lines · 353 code · 162 blank · 307 comment · 2 complexity · e16611f1294ecdfcafd78e21b41b7c01 MD5 · raw file

  1. indexing
  2. description: "GtkTreeViewColumn - A visible column in a GtkTreeView widget."
  3. copyright: "[
  4. Copyright (C) 2006 eiffel-libraries team, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. class GTK_TREE_VIEW_COLUMN
  19. -- The GtkTreeViewColumn object represents a visible column in a
  20. -- GtkTreeView widget. It allows to set properties of the column
  21. -- header, and functions as a holding pen for the cell renderers
  22. -- which determine how the data in the column is displayed.
  23. -- Please refer to the tree widget conceptual overview for an
  24. -- overview of all the objects and data types related to the
  25. -- tree widget and how they work together.class
  26. -- GTK_TREE_VIEW_COLUMN_EXTERNALS
  27. inherit
  28. GTK_OBJECT
  29. GTK_CELL_LAYOUT
  30. undefine store_eiffel_wrapper
  31. redefine
  32. clear,
  33. add_attribute, clear_attributes, set_attributes,
  34. pack_start, pack_end
  35. end
  36. insert
  37. GTK_TREE_VIEW_COLUMN_EXTERNALS
  38. GTK_TREE_VIEW_COLUMN_SIZING
  39. GTK_SORT_TYPE
  40. creation make, with_attributes
  41. creation {WRAPPER, WRAPPER_HANDLER} from_external_pointer, secondary_wrapper_from
  42. feature {} -- Creation
  43. make is
  44. -- Creates a new GtkTreeViewColumn.
  45. require gtk_initialized: gtk.is_initialized
  46. do
  47. from_external_pointer (gtk_tree_view_column_new)
  48. end
  49. with_attributes (a_title: STRING; a_renderer: GTK_CELL_RENDERER; some_attributes: COLLECTION [TUPLE[STRING,INTEGER]]) is
  50. -- Creates a new GtkTreeViewColumn with a number of default
  51. -- values. This is equivalent to calling `set_title',
  52. -- `pack_start', and `set_attributes' on the newly created
  53. -- GtkTreeViewColumn.
  54. -- TODO: Eiffelize this:
  55. -- Here's a simple example:
  56. -- enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS };
  57. -- ...
  58. -- {
  59. -- GtkTreeViewColumn *column;
  60. -- GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
  61. -- column = gtk_tree_view_column_new_with_attributes ("Title",
  62. -- renderer, "text", TEXT_COLUMN, "foreground", COLOR_COLUMN,
  63. -- NULL); }
  64. require
  65. gtk_initialized: gtk.is_initialized
  66. title_not_void: a_title /= Void
  67. renderer_not_void: a_renderer /= Void
  68. do
  69. make
  70. set_title (a_title)
  71. pack_start(a_renderer, True)
  72. set_attributes (a_renderer, some_attributes)
  73. end
  74. feature
  75. pack_start (a_cell: GTK_CELL_RENDERER; does_expand: BOOLEAN) is
  76. -- Packs `a_cell' into the beginning of the column. If
  77. -- `does_expand' is False, then the cell is allocated no more
  78. -- space than it needs. Any unused space is divided evenly
  79. -- between cells for which expand is True.
  80. do
  81. gtk_tree_view_column_pack_start (handle, a_cell.handle, does_expand.to_integer)
  82. end
  83. pack_end (a_cell: GTK_CELL_RENDERER; does_expand: BOOLEAN) is
  84. -- Adds `a_cell' to end of the column. If `does_expand' is
  85. -- False, then the cell is allocated no more space than it
  86. -- needs. Any unused space is divided evenly between cells
  87. -- for which expand is True.
  88. do
  89. gtk_tree_view_column_pack_end (handle, a_cell.handle, does_expand.to_integer)
  90. end
  91. clear is
  92. -- Unsets all the mappings on all renderers on the column.
  93. do
  94. gtk_tree_view_column_clear (handle)
  95. end
  96. cell_renderers: G_LIST [GTK_CELL_RENDERER] is
  97. -- a GList of all the cell renderers in the column, in no
  98. -- particular order.
  99. do
  100. -- Returns a newly-allocated GList of all the cell renderers
  101. -- in the column, in no particular order. The list must be
  102. -- freed with g_list_free().
  103. create {G_OBJECT_LIST[GTK_CELL_RENDERER]}
  104. Result.from_external_pointer (gtk_tree_view_column_get_cell_renderers (handle))
  105. ensure
  106. Result/=Void
  107. end
  108. add_attribute (a_cell_renderer: GTK_CELL_RENDERER; an_attribute: STRING; a_column: INTEGER) is
  109. -- Adds `an_attribute' mapping to the list in
  110. -- tree_column. `a_column' is the column of the model to get
  111. -- a value from, and the attribute is the parameter on
  112. -- `a_cell_renderer' to be set from the value. So for example
  113. -- if column 2 of the model contains strings, you could have
  114. -- the "text" attribute of a GtkCellRendererText get its
  115. -- values from column 2.
  116. -- `a_cell_renderer': GtkCellRenderer to set attributes on
  117. -- `an_attribute' : An attribute on the renderer
  118. -- `a_column' : The column position on the model to get the
  119. -- attribute from.
  120. do
  121. gtk_tree_view_column_add_attribute (handle, a_cell_renderer.handle,
  122. an_attribute.to_external, a_column)
  123. end
  124. set_attributes (a_renderer: GTK_CELL_RENDERER; some_attributes: COLLECTION [TUPLE[STRING,INTEGER]]) is
  125. -- Sets the list as the attributes (`some_attributes') of
  126. -- tree column. All existing attributes are removed, and
  127. -- replaced with the new attributes.
  128. local iter: ITERATOR [TUPLE[STRING,INTEGER]]
  129. do
  130. clear_attributes (a_renderer)
  131. from iter:=some_attributes.get_new_iterator;iter.start
  132. until iter.is_off
  133. loop
  134. add_attribute (a_renderer, iter.item.item_1, iter.item.item_2)
  135. iter.next
  136. end
  137. end
  138. -- TODO: gtk_tree_view_column_set_cell_data_func ()
  139. -- void gtk_tree_view_column_set_cell_data_func (GtkTreeViewColumn
  140. -- *tree_column, GtkCellRenderer *cell_renderer, GtkTreeCellDataFunc
  141. -- func, gpointer func_data, GtkDestroyNotify destroy);
  142. -- Sets the GtkTreeViewColumnFunc to use for the column. This
  143. -- function is used instead of the standard attributes mapping for
  144. -- setting the column value, and should set the value of
  145. -- tree_column's cell renderer as appropriate. func may be NULL to
  146. -- remove an older one.
  147. -- tree_column : A GtkTreeViewColumn
  148. -- cell_renderer : A GtkCellRenderer
  149. -- func : The GtkTreeViewColumnFunc to use.
  150. -- func_data : The user data for func.
  151. -- destroy : The destroy notification for func_data
  152. clear_attributes (a_cell_renderer: GTK_CELL_RENDERER) is
  153. -- Clears all existing attributes previously set with
  154. -- `set_attributes'.
  155. -- `a_cell_renderer': a GtkCellRenderer to clear the
  156. -- attribute mapping on.
  157. do
  158. gtk_tree_view_column_clear_attributes (handle, a_cell_renderer.handle)
  159. end
  160. feature -- Spacing
  161. set_spacing (a_spacing: INTEGER) is
  162. -- Sets the spacing field of tree_column, which is the number
  163. -- of pixels to place between cell renderers packed into it.
  164. do
  165. gtk_tree_view_column_set_spacing (handle, a_spacing)
  166. end
  167. spacing: INTEGER is
  168. -- the spacing of the tree column.
  169. do
  170. Result := gtk_tree_view_column_get_spacing (handle)
  171. end
  172. feature -- Visibility
  173. set_visible is
  174. -- Makes the column visible
  175. do
  176. gtk_tree_view_column_set_visible (handle, 1)
  177. ensure visible: is_visible
  178. end
  179. set_invisible is
  180. -- Makes the column visible
  181. do
  182. gtk_tree_view_column_set_visible (handle, 0)
  183. ensure invisible: not is_visible
  184. end
  185. is_visible: BOOLEAN is
  186. -- Is the tree column visible, i.e. shown by the tree?
  187. do
  188. Result := (gtk_tree_view_column_get_visible (handle)).to_boolean
  189. end
  190. feature -- Resizability
  191. set_resizable is
  192. -- Allow the user to explicitly resize the column by grabbing
  193. -- the outer edge of the column button. If sizing mode of
  194. -- the column is `gtk_tree_view_column_autosize', then the sizing
  195. -- mode is changed to `gtk_tree_view_column_grow_only'.
  196. do
  197. gtk_tree_view_column_set_resizable (handle, 1)
  198. ensure resizable: is_resizable
  199. end
  200. unset_resizable is
  201. -- Forbid the user to resize the column.
  202. do
  203. gtk_tree_view_column_set_resizable (handle, 0)
  204. ensure unresizable: not is_resizable
  205. end
  206. is_resizable: BOOLEAN is
  207. -- Can the tree_column be resized by the end user?
  208. do
  209. Result:=gtk_tree_view_column_get_resizable(handle).to_boolean
  210. end
  211. feature -- Sizing
  212. set_sizing (a_type: INTEGER) is
  213. -- Sets the growth behavior of tree_column to `a_type'.
  214. require valid_type: is_valid_gtk_tree_view_column_sizing (a_type)
  215. do
  216. gtk_tree_view_column_set_sizing (handle, a_type)
  217. end
  218. set_grow_only is
  219. -- Makes the column bigger only in reaction to changes in the
  220. -- model
  221. do
  222. set_sizing (gtk_tree_view_column_grow_only)
  223. end
  224. set_autosize is
  225. -- Makes the column size to be the optimal size everytime the
  226. -- model changes.
  227. do
  228. set_sizing (gtk_tree_view_column_autosize)
  229. end
  230. set_fixed is
  231. -- Makes the column a fixed numbers of pixels wide.
  232. do
  233. set_sizing (gtk_tree_view_column_fixed)
  234. end
  235. sizing_type: INTEGER is
  236. -- the current type of tree_column.
  237. do
  238. Result := gtk_tree_view_column_get_sizing (handle)
  239. ensure valid_type: is_valid_gtk_tree_view_column_sizing (Result)
  240. end
  241. is_grow_only: BOOLEAN is
  242. do
  243. Result := (sizing_type = gtk_tree_view_column_grow_only)
  244. end
  245. is_autosize: BOOLEAN is
  246. do
  247. Result := (sizing_type = gtk_tree_view_column_autosize)
  248. end
  249. is_fixed:BOOLEAN is
  250. do
  251. Result := (sizing_type = gtk_tree_view_column_fixed)
  252. end
  253. feature -- Width
  254. width: INTEGER is
  255. -- the current size of tree column in pixels.
  256. do
  257. Result := gtk_tree_view_column_get_width (handle)
  258. end
  259. fixed_width: INTEGER is
  260. -- The fixed width of the column. This value is only meaning
  261. -- may not be the actual width of the column on the screen,
  262. -- just what is requested.
  263. do
  264. Result := gtk_tree_view_column_get_fixed_width (handle)
  265. end
  266. set_fixed_width (a_width: INTEGER) is
  267. -- Sets the size of the column in pixels. This is meaningful
  268. -- only if the sizing type is gtk_tree_view_column_fixed
  269. -- (is_fixed = True). The size of the column is clamped to
  270. -- the min/max width for the column. Please note that the
  271. -- min/max width of the column doesn't actually affect the
  272. -- "fixed_width" property of the widget, just the actual size
  273. -- when displayed.
  274. require valid_width: a_width > 0
  275. do
  276. gtk_tree_view_column_set_fixed_width (handle, a_width)
  277. end
  278. set_min_width (a_width: INTEGER) is
  279. -- Sets the minimum width of the tree_column. If min_width is -1, then the minimum width is unset.
  280. require valid_width: a_width > 0
  281. do
  282. gtk_tree_view_column_set_min_width (handle, a_width)
  283. ensure set: min_width = a_width
  284. end
  285. unset_min_width is
  286. -- Unsets the minimum width of the tree_column. If queried, min_width is -1,
  287. do
  288. gtk_tree_view_column_set_min_width (handle, -1)
  289. ensure unset: min_width = -1
  290. end
  291. min_width: INTEGER is
  292. -- The minimum width in pixels of the tree_column, or -1 if no minimum width is set.
  293. do
  294. Result := gtk_tree_view_column_get_min_width (handle)
  295. ensure valid: Result >= -1
  296. end
  297. set_max_width (a_width: INTEGER) is
  298. -- Sets the maximum width of the tree_column. If max_width is
  299. -- -1, then the maximum width is unset. Note, the column can
  300. -- actually be wider than max width if it's the last column
  301. -- in a view. In this case, the column expands to fill any
  302. -- extra space.
  303. do
  304. gtk_tree_view_column_set_max_width (handle, a_width)
  305. ensure set: max_width = a_width
  306. end
  307. unset_max_width is
  308. -- Unset the maximum width. See `set_max_width'
  309. do
  310. gtk_tree_view_column_set_max_width (handle, -1)
  311. ensure unset: max_width = -1
  312. end
  313. max_width: INTEGER is
  314. -- the maximum width in pixels of the tree_column, or -1 if
  315. -- no maximum width is set.
  316. do
  317. Result := gtk_tree_view_column_get_max_width (handle)
  318. end
  319. feature
  320. clicked is
  321. -- Emits the "clicked" signal on the column. It will only
  322. -- work if tree_column is clickable.
  323. do
  324. gtk_tree_view_column_clicked (handle)
  325. end
  326. set_title (a_title: STRING) is
  327. -- Sets the title of the tree column. If a custom widget has
  328. -- been set, then this value is ignored.
  329. require valid_title: a_title /= Void
  330. do
  331. gtk_tree_view_column_set_title (handle, a_title.to_external)
  332. end
  333. title: STRING is
  334. -- The title of the widget.
  335. do
  336. -- the title of the column. This string should not be
  337. -- modified or freed.
  338. create Result.from_external_copy (gtk_tree_view_column_get_title(handle))
  339. ensure not_void: Result/=Void
  340. end
  341. feature -- Expandability
  342. set_expand is
  343. -- Sets the column to take available extra space. This space
  344. -- is shared equally amongst all columns that have the expand
  345. -- set to True. If no column has this option set, then the
  346. -- last column gets all extra space. By default, every column
  347. -- is created with is_expanded= False.
  348. do
  349. gtk_tree_view_column_set_expand (handle, 1)
  350. ensure is_expanded: is_expanded
  351. end
  352. unset_expand is
  353. -- Makes the column unexpanded. This is the default. See
  354. -- `set_expand'
  355. do
  356. gtk_tree_view_column_set_expand (handle, 0)
  357. ensure not_expanded: not is_expanded
  358. end
  359. is_expanded: BOOLEAN is
  360. -- Does the column expand to take any available space?
  361. do
  362. Result := gtk_tree_view_column_get_expand (handle).to_boolean
  363. end
  364. feature -- Clickability
  365. set_clickable is
  366. -- Sets the header to be active if active. When the header is
  367. -- active, then it can take keyboard focus, and can be
  368. -- clicked.
  369. do
  370. gtk_tree_view_column_set_clickable (handle, 1)
  371. ensure clickable: is_clickable
  372. end
  373. unset_clickable is
  374. -- Sets the header to be inactive.
  375. do
  376. gtk_tree_view_column_set_clickable (handle, 0)
  377. ensure unclickable: not is_clickable
  378. end
  379. is_clickable: BOOLEAN is
  380. -- Can the user click on the header for the column?
  381. do
  382. Result := gtk_tree_view_column_get_clickable(handle).to_boolean
  383. end
  384. set_widget (a_widget: GTK_WIDGET) is
  385. -- Sets the widget in the header to be widget.
  386. require valid_widget: a_widget/=Void
  387. do
  388. gtk_tree_view_column_set_widget (handle, a_widget.handle)
  389. end
  390. unset_widget is
  391. -- The header button is set with a GtkLabel set to `title'.
  392. do
  393. gtk_tree_view_column_set_widget (handle, default_pointer)
  394. end
  395. widget: GTK_WIDGET is
  396. -- the GtkWidget in the button on the column header. If a custom
  397. -- widget has not been set then Void is returned.
  398. do
  399. -- TODO: get the wrapper stored into into the gtkobject
  400. -- GtkWidget* gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column);
  401. ensure implemented: False
  402. end
  403. set_alignment (xalign: REAL_32) is
  404. -- Sets the alignment of the title or custom widget inside
  405. -- the column header. The alignment determines its location
  406. -- inside the button 0.0 for left, 0.5 for center, 1.0 for
  407. -- right.
  408. require valid_align: xalign.in_range ({REAL_32 0.0}, {REAL_32 1.0})
  409. do
  410. gtk_tree_view_column_set_alignment (handle, xalign)
  411. end
  412. alignment: REAL_32 is
  413. -- the current x alignment of tree_column. This value can
  414. -- range between 0.0 and 1.0.
  415. do
  416. Result := gtk_tree_view_column_get_alignment (handle)
  417. ensure valid: Result.in_range ({REAL_32 0.0}, {REAL_32 1.0})
  418. end
  419. feature -- Reorderability
  420. set_reorderable is
  421. -- The column can be reordered by the end user dragging the header.
  422. do
  423. gtk_tree_view_column_set_reorderable (handle, 1)
  424. ensure reorderable: is_reorderable
  425. end
  426. unset_reorderable is
  427. -- Makes the column not reorderable
  428. do
  429. gtk_tree_view_column_set_reorderable (handle, 0)
  430. ensure not_reorderable: not is_reorderable
  431. end
  432. is_reorderable: BOOLEAN is
  433. -- Can the tree column be reordered by the user?
  434. do
  435. Result:=gtk_tree_view_column_get_reorderable(handle).to_boolean
  436. end
  437. set_sort_column_id (a_column_id: INTEGER) is
  438. -- Sets the logical `a_column_id' that this column sorts on
  439. -- when this column is selected for sorting. Doing so makes
  440. -- the column header clickable.
  441. do
  442. gtk_tree_view_column_set_sort_column_id (handle, a_column_id)
  443. ensure set: sort_column_id = a_column_id
  444. end
  445. sort_column_id: INTEGER is
  446. -- the logical sort_column_id that the model sorts on when
  447. -- this column is selected for sorting. See
  448. -- `set_sort_column_id'. -1 if this column can't be used for
  449. -- sorting.
  450. do
  451. Result:=gtk_tree_view_column_get_sort_column_id(handle)
  452. end
  453. show_sort_indicator is
  454. -- Display an arrow in the header button indicating the
  455. -- column is sorted. Call `set_sort_order' to change the
  456. -- direction of the arrow.
  457. do
  458. gtk_tree_view_column_set_sort_indicator (handle, 1)
  459. ensure shown: sort_indicator_shown
  460. end
  461. hide_sort_indicator is
  462. -- Remove the arrow in the header button indicating the column is sorted.
  463. do
  464. gtk_tree_view_column_set_sort_indicator (handle, 0)
  465. ensure hided: sort_indicator_shown
  466. end
  467. sort_indicator_shown: BOOLEAN is
  468. do
  469. Result:=gtk_tree_view_column_get_sort_indicator(handle).to_boolean
  470. end
  471. set_sort_order_ascending is
  472. -- Changes the appearance of the sort indicator to ascending.
  473. -- This does not actually sort the model. Use
  474. -- `set_sort_column_id' if you want automatic sorting
  475. -- support. This function is primarily for custom sorting
  476. -- behavior, and should be used in conjunction with
  477. -- `set_sort_column' to do that. For custom models, the
  478. -- mechanism will vary.
  479. -- The sort indicator changes direction to indicate normal
  480. -- sort or reverse sort. Note that you must have the sort
  481. -- indicator enabled to see anything when calling this
  482. -- function; see `set_sort_indicator'.
  483. do
  484. gtk_tree_view_column_set_sort_order (handle,gtk_sort_ascending)
  485. ensure set: is_sort_order_ascending
  486. end
  487. set_sort_order_descending is
  488. -- Changes the appearance of the sort indicator to
  489. -- descending. See also `set_sort_order_ascending'.
  490. do
  491. gtk_tree_view_column_set_sort_order (handle,gtk_sort_descending)
  492. end
  493. is_sort_order_ascending: BOOLEAN is
  494. -- Is the sort order ascending?
  495. do
  496. Result:=(gtk_tree_view_column_get_sort_order(handle)=gtk_sort_ascending)
  497. end
  498. -- TODO: wrap gtk_tree_view_column_cell_set_cell_data (). When it
  499. -- is used?
  500. -- void gtk_tree_view_column_cell_set_cell_data (GtkTreeViewColumn
  501. -- *tree_column, GtkTreeModel *tree_model, GtkTreeIter *iter,
  502. -- gboolean is_expander, gboolean is_expanded);
  503. -- Sets the cell renderer based on the tree_model and iter. That
  504. -- is, for every attribute mapping in tree_column, it will get a
  505. -- value from the set column on the iter, and use that value to set
  506. -- the attribute on the cell renderer. This is used primarily by
  507. -- the GtkTreeView.
  508. -- tree_column : A GtkTreeViewColumn.
  509. -- tree_model : The GtkTreeModel to to get the cell renderers attributes from.
  510. -- iter : The GtkTreeIter to to get the cell renderer's attributes from.
  511. -- is_expander : TRUE, if the row has children
  512. -- is_expanded : TRUE, if the row has visible children
  513. cell_size: TUPLE[INTEGER,INTEGER,INTEGER,INTEGER] is
  514. -- x_offset,y_offset,width,height needed to render the
  515. -- column.
  516. local an_x_offset,an_y_offset,a_width,an_height: INTEGER
  517. do
  518. -- Obtains the width and height needed to render the
  519. -- column. This is used primarily by the GtkTreeView.
  520. -- tree_column : A GtkTreeViewColumn.
  521. -- cell_area : The area a cell in the column will be allocated, or NULL
  522. -- x_offset : location to return x offset of a cell relative to cell_area, or NULL
  523. -- y_offset : location to return y offset of a cell relative to cell_area, or NULL
  524. -- width : location to return width needed to render a cell, or NULL
  525. -- height : location to return height needed to render a cell, or NULL
  526. gtk_tree_view_column_cell_get_size (handle, default_pointer,
  527. $an_x_offset,$an_y_offset,$a_width,$an_height)
  528. create Result.make_4 (an_x_offset,an_y_offset,a_width,an_height)
  529. end
  530. -- TODO: gtk_tree_view_column_cell_get_position ()
  531. -- gboolean gtk_tree_view_column_cell_get_position
  532. -- (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer,
  533. -- gint *start_pos, gint *width);
  534. -- Obtains the horizontal position and size of a cell in a
  535. -- column. If the cell is not found in the column, start_pos and
  536. -- width are not changed and FALSE is returned.
  537. -- tree_column : a GtkTreeViewColumn
  538. -- cell_renderer : a GtkCellRenderer
  539. -- start_pos : return location for the horizontal position of cell within tree_column, may be NULL
  540. -- width : return location for the width of cell, may be NULL
  541. -- Returns : TRUE if cell belongs to tree_column.
  542. is_cell_visible: BOOLEAN is
  543. -- Is any of the cells packed into the tree_column visible?
  544. -- For this to be meaningful, you must first initialize the
  545. -- cells with `set_cell_data'.
  546. do
  547. Result:= gtk_tree_view_column_cell_is_visible(handle).to_boolean
  548. end
  549. focus_cell (a_cell_renderer: GTK_CELL_RENDERER) is
  550. -- Sets the current keyboard focus to be at cell, if the
  551. -- column contains 2 or more editable and activatable cells.
  552. do
  553. gtk_tree_view_column_focus_cell (handle, a_cell_renderer.handle)
  554. end
  555. queue_resize is
  556. -- Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.
  557. do
  558. gtk_tree_view_column_queue_resize(handle)
  559. end
  560. feature -- TODO: Properties and signals
  561. -- "alignment" gfloat : Read / Write
  562. -- "clickable" gboolean : Read / Write
  563. -- "expand" gboolean : Read / Write
  564. -- "fixed-width" gint : Read / Write
  565. -- "max-width" gint : Read / Write
  566. -- "min-width" gint : Read / Write
  567. -- "reorderable" gboolean : Read / Write
  568. -- "resizable" gboolean : Read / Write
  569. -- "sizing" GtkTreeViewColumnSizing : Read / Write
  570. -- "sort-indicator" gboolean : Read / Write
  571. -- "sort-order" GtkSortType : Read / Write
  572. -- "spacing" gint : Read / Write
  573. -- "title" gchararray : Read / Write
  574. -- "visible" gboolean : Read / Write
  575. -- "widget" GtkWidget : Read / Write
  576. -- "width" gint : Read
  577. -- Signals
  578. -- "clicked" void user_function (GtkTreeViewColumn *treeviewcolumn,
  579. -- gpointer user_data);
  580. -- The "alignment" property
  581. -- "alignment" gfloat : Read / Write
  582. -- X Alignment of the column header text or widget.
  583. -- Allowed values: [0,1]
  584. -- Default value: 0
  585. -- The "clickable" property
  586. -- "clickable" gboolean : Read / Write
  587. -- Whether the header can be clicked.
  588. -- Default value: FALSE
  589. -- The "expand" property
  590. -- "expand" gboolean : Read / Write
  591. -- Column gets share of extra width allocated to the widget.
  592. -- Default value: FALSE
  593. -- The "fixed-width" property
  594. -- "fixed-width" gint : Read / Write
  595. -- Current fixed width of the column.
  596. -- Allowed values: >= 1
  597. -- Default value: 1
  598. -- The "max-width" property
  599. -- "max-width" gint : Read / Write
  600. -- Maximum allowed width of the column.
  601. -- Allowed values: >= -1
  602. -- Default value: -1
  603. -- The "min-width" property
  604. -- "min-width" gint : Read / Write
  605. -- Minimum allowed width of the column.
  606. -- Allowed values: >= -1
  607. -- Default value: -1
  608. -- The "reorderable" property
  609. -- "reorderable" gboolean : Read / Write
  610. -- Whether the column can be reordered around the headers.
  611. -- Default value: FALSE
  612. -- The "resizable" property
  613. -- "resizable" gboolean : Read / Write
  614. -- Column is user-resizable.
  615. -- Default value: FALSE
  616. -- The "sizing" property
  617. -- "sizing" GtkTreeViewColumnSizing : Read / Write
  618. -- Resize mode of the column.
  619. -- Default value: GTK_TREE_VIEW_COLUMN_GROW_ONLY
  620. -- The "sort-indicator" property
  621. -- "sort-indicator" gboolean : Read / Write
  622. -- Whether to show a sort indicator.
  623. -- Default value: FALSE
  624. -- The "sort-order" property
  625. -- "sort-order" GtkSortType : Read / Write
  626. -- Sort direction the sort indicator should indicate.
  627. -- Default value: GTK_SORT_ASCENDING
  628. -- The "spacing" property
  629. -- "spacing" gint : Read / Write
  630. -- Space which is inserted between cells.
  631. -- Allowed values: >= 0
  632. -- Default value: 0
  633. -- The "title" property
  634. -- "title" gchararray : Read / Write
  635. -- Title to appear in column header.
  636. -- Default value: ""
  637. -- The "visible" property
  638. -- "visible" gboolean : Read / Write
  639. -- Whether to display the column.
  640. -- Default value: TRUE
  641. -- The "widget" property
  642. -- "widget" GtkWidget : Read / Write
  643. -- Widget to put in column header button instead of column title.
  644. -- The "width" property
  645. -- "width" gint : Read
  646. -- Current width of the column.
  647. -- Allowed values: >= 0
  648. -- Default value: 0
  649. -- Signal Details
  650. -- The "clicked" signal
  651. -- void user_function (GtkTreeViewColumn *treeviewcolumn,
  652. -- gpointer user_data);
  653. -- treeviewcolumn : the object which received the signal.
  654. -- user_data : user data set when the signal handler was connected.
  655. feature -- struct size
  656. struct_size: INTEGER is
  657. external "C inline use <gtk/gtk.h>"
  658. alias "sizeof(GtkTreeViewColumn)"
  659. end
  660. end