[gtkmm/wip/dboles/Button-Issue#58: 1/2] Button: Remove mentions of NULL args @ set_image()



commit 57c18a0ed82191b3aefc29d6e5524a175f292022
Author: Daniel Boles <dboles src gmail com>
Date:   Fri Nov 15 19:07:17 2019 +0000

    Button: Remove mentions of NULL args @ set_image()
    
    ...by copying the documentation generated from the C docs and fixing it
    up, because neither a string nor a Widget& in C++ can be NULL/nullptr.
    
    The documentation as generated and previously left in the .h file was:
    
    >>>
    ```cpp
      /** Set the image of @a button to the given widget. The image will be
       * displayed if the label text is <tt>nullptr</tt> or if
       * Gtk::Button::property_always_show_image() is <tt>true</tt>. You don’t have to call
       * Gtk::Widget::show() on @a image yourself.
       *
       * @newin{2,6}
       *
       * @param image A widget to set as the image for the button, or <tt>nullptr</tt> to unset.
       */
    ```
    >>>

 gtk/src/button.hg | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 7d82e0dc..7be87207 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -138,6 +138,16 @@ public:
    */
   void set_image_from_icon_name(const Glib::ustring& icon_name, IconSize size, bool use_fallback);
 
+  /** Set the image of @a button to the given widget.
+   *
+   * The @a image will be displayed if the property_label() text is empty or if
+   * property_always_show_image() is <tt>true</tt>. You don’t have to call
+   * Gtk::Widget::show() on @a image yourself.
+   *
+   * @newin{2,6}
+   *
+   * @param image A widget to set as the image for the button.
+   */
   _WRAP_METHOD(void set_image(Widget& image), gtk_button_set_image)
   _WRAP_METHOD(Widget* get_image(), gtk_button_get_image)
   _WRAP_METHOD(const Widget* get_image() const, gtk_button_get_image, constversion)


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