[gtkmm] Gtk::Widget::get_is_drawable() -> is_drawable()



commit 045dfa268c5ddea7e946c16e93a0cdaa650f91c1
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Wed Nov 4 18:53:15 2020 +0100

    Gtk::Widget::get_is_drawable() -> is_drawable()
    
    * gtk/src/textbuffer.ccg: Improve some const declarations.
    * gtk/src/treeview.hg: Document is_blank_at_pos().
    * gtk/src/widget.hg: Rename get_is_drawable() to is_drawable().

 gtk/src/textbuffer.ccg |  9 +++-----
 gtk/src/treeview.hg    | 60 ++++++++++++++++++++++++++++++++++++++++++++------
 gtk/src/widget.hg      |  2 +-
 3 files changed, 57 insertions(+), 14 deletions(-)
---
diff --git a/gtk/src/textbuffer.ccg b/gtk/src/textbuffer.ccg
index 3c826eee..f34d0639 100644
--- a/gtk/src/textbuffer.ccg
+++ b/gtk/src/textbuffer.ccg
@@ -342,13 +342,10 @@ TextBuffer::iterator TextBuffer::insert_with_tags(const iterator& pos,
 
   Glib::ArrayHandler<Glib::RefPtr<Tag> >::ArrayKeeperType array_keeper (Glib::ArrayHandler<Glib::RefPtr<Tag> 
::vector_to_array(tags));
 
-  //This was GtkTextTag* const * const, but the SUN Forte compiler said that it couldn't convert to that. 
murrayc
-  const GtkTextTag* const* tags_begin = array_keeper.data();
-  const GtkTextTag* const* tags_end   = tags_begin + tags.size();
+  GtkTextTag* const* const tags_begin = array_keeper.data();
+  GtkTextTag* const* const tags_end   = tags_begin + tags.size();
 
-  //TODO: Investigate if this const_cast<> is really necessary.
-  //I added it for the SUN Forte compiler. murrayc.
-  for(GtkTextTag *const * ptag = const_cast<GtkTextTag* const *>(tags_begin); ptag != const_cast<GtkTextTag* 
const *>(tags_end); ++ptag)
+  for (GtkTextTag* const* ptag = tags_begin; ptag != tags_end; ++ptag)
   {
     gtk_text_buffer_apply_tag(gobj(), *ptag, &range_begin, range_end.gobj());
   }
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 127a735c..61014e2b 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -515,11 +515,11 @@ public:
    *
    * @param x The x position to be identified (relative to bin_window).
    * @param y The y position to be identified (relative to bin_window).
-   * @param path A reference to a TreeModel::Path to be filled in
-   * @param column A reference to a TreeViewColumn pointer to be filled in
-   * @param cell_x A reference where the X coordinate relative to the cell
+   * @param[out] path A reference to a TreeModel::Path to be filled in
+   * @param[out] column A reference to a TreeViewColumn pointer to be filled in
+   * @param[out] cell_x A reference where the X coordinate relative to the cell
    *   can be placed
-   * @param cell_y A reference where the Y coordinate relative to the cell
+   * @param[out] cell_y A reference where the Y coordinate relative to the cell
    *   can be placed
    * @return true if a row exists at that coordinate.
    *
@@ -560,11 +560,58 @@ public:
    bool get_visible_range(TreeModel::Path& start_path, TreeModel::Path& end_path) const;
   _IGNORE(gtk_tree_view_get_visible_range)
 
-  //TODO: Documentation
+  /** Determine whether the point (@a x, @a y) in the tree view is blank, that is no
+   * cell content nor an expander arrow is drawn at the location.
+   *
+   * If so, the location can be considered as the background. You might wish to take
+   * special action on clicks on the background, such as clearing a current
+   * selection, having a custom context menu or starting rubber banding.
+   *
+   * The @a x and @a y coordinates that are provided must be relative to bin_window
+   * coordinates.  Widget-relative coordinates must be converted using
+   * convert_widget_to_bin_window_coords().
+   *
+   * For converting widget coordinates (eg. the ones you get from
+   * Gtk::Widget::signal_query_tooltip()), please see
+   * convert_widget_to_bin_window_coords().
+   *
+   * The @a path, @a column, @a cell_x and @a cell_y arguments will be filled in
+   * likewise as for get_path_at_pos(). Please see get_path_at_pos() for more information.
+   *
+   * @param x The x position to be identified (relative to bin_window).
+   * @param y The y position to be identified (relative to bin_window).
+   * @param[out] path A reference to a Gtk::TreePath to be filled in.
+   * @param[out] column A reference to a Gtk::TreeViewColumn pointer to be filled in.
+   * @param[out] cell_x A reference where the X coordinate relative to the
+   *             cell can be placed.
+   * @param[out] cell_y A reference where the Y coordinate relative to the
+   *             cell can be placed.
+   * @return <tt>true</tt> if the area at the given coordinates is blank,
+   * <tt>false</tt> otherwise.
+   */
   bool is_blank_at_pos(int x, int y, TreePath& path, TreeViewColumn*& column, int& cell_x, int& cell_y) 
const;
   _IGNORE(gtk_tree_view_is_blank_at_pos)
 
-  //TODO: Documentation
+  /** Determine whether the point (@a x, @a y) in the tree view is blank, that is no
+   * cell content nor an expander arrow is drawn at the location.
+   *
+   * If so, the location can be considered as the background. You might wish to take
+   * special action on clicks on the background, such as clearing a current
+   * selection, having a custom context menu or starting rubber banding.
+   *
+   * The @a x and @a y coordinates that are provided must be relative to bin_window
+   * coordinates.  Widget-relative coordinates must be converted using
+   * convert_widget_to_bin_window_coords().
+   *
+   * For converting widget coordinates (eg. the ones you get from
+   * Gtk::Widget::signal_query_tooltip()), please see
+   * convert_widget_to_bin_window_coords().
+   *
+   * @param x The x position to be identified (relative to bin_window).
+   * @param y The y position to be identified (relative to bin_window).
+   * @return <tt>true</tt> if the area at the given coordinates is blank,
+   * <tt>false</tt> otherwise.
+   */
   bool is_blank_at_pos(int x, int y) const;
 
 
@@ -681,7 +728,6 @@ public:
   _WRAP_METHOD(void set_rubber_banding(bool enable = true), gtk_tree_view_set_rubber_banding)
   _WRAP_METHOD(bool get_rubber_banding() const, gtk_tree_view_get_rubber_banding)
 
-  //TODO: Rename to get_is?
   _WRAP_METHOD(bool is_rubber_banding_active() const, gtk_tree_view_is_rubber_banding_active)
 
   /** The slot type for determining whether the row pointed to by the iterator should be rendered as a 
separator.
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index b90c680a..529fbe5e 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -180,7 +180,7 @@ public:
   _WRAP_METHOD(void set_visible(bool visible = true), gtk_widget_set_visible)
   _WRAP_METHOD(bool get_visible() const, gtk_widget_get_visible)
   _WRAP_METHOD(bool is_visible() const, gtk_widget_is_visible)
-  _WRAP_METHOD(bool get_is_drawable() const, gtk_widget_is_drawable)
+  _WRAP_METHOD(bool is_drawable() const, gtk_widget_is_drawable)
   _WRAP_METHOD(bool get_realized() const, gtk_widget_get_realized)
   _WRAP_METHOD(bool get_mapped() const, gtk_widget_get_mapped)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]