]> Pileus Git - ~andy/gtk/blobdiff - docs/widget_geometry.txt
docs: remove duplicate entries in gtk3-sections
[~andy/gtk] / docs / widget_geometry.txt
index d6627f44f6378fb01c10e7fe3274499358cb7c04..7298ff4b68e190378cc7c34b27eab3e3cfa67cde 100644 (file)
@@ -1,5 +1,100 @@
 This file is some notes about how different widgets are drawn.
 
+=============
+
+GtkMenu
+
+=============
++----------------------------------------------------------------------------+
+|                                A                                           |
+| +------------------------------------------------------------------------+ |
+| |############################# C ########################################| |
+| |#                             D                                        #| |
+| |# +-------------------------------------------------------------------+#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                      Item 1                                       |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# +-------------------------------------------------------------------+#| |
+| |# +-------------------------------------------------------------------+#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+|A|B |                                                                   |B|A|
+| |# |                      Item 2                                       |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# +-------------------------------------------------------------------+#| |
+| |#                        [...]                                         #| |
+| |# +-------------------------------------------------------------------+#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                      Item n                                       |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# |                                                                   |#| |
+| |# +-------------------------------------------------------------------+#| |
+| |#                             D                                        #| |
+| |############################# C ########################################| |
+| +------------------------------------------------------------------------| |
+|                                A                                           |
++----------------------------------------------------------------------------+
+
+A: GtkContainer::border_width
+B: xthickness
+C: ythickness
+D: vertical_padding
+
+=============
+
+GtkMenuItem
+
+=============
+
++----------------------------------------------------------------------------+
+|                                A                                           |
+| +------------------------------------------------------------------------+ |
+| |############################# C ########################################| |
+| |#+-+------------+--+-------------------------------+--+-------------+-+#| |
+| |#| |\\\\\\\\\\\\|  |                  /|\          |**|             | |#| |
+| |#| |<------E------>|                   |           |**|      G      | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|             | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|   >>        | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|   >>>>      | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|   >>>>>>    | |#| |
+|A|B|D|\\\\\\\\\\\\| F|      Child        G           |*H|   >>>>>>>>  |D|B|A|
+| |#| |\\\\\\\\\\\\|  |                   |           |**|   >>>>>>    | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|   >>>>      | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|   >>        | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|             | |#| |
+| |#| |\\\\\\\\\\\\|  |                   |           |**|             | |#| |
+| |#| |\\\\\\\\\\\\|  |                  \|/          |**|             | |#| |
+| |#+-+------------+--+-------------------------------+--+-------------+-+#| |
+| |############################# C ########################################| |
+| +------------------------------------------------------------------------+ |
+|                                A                                           |
++----------------------------------------------------------------------------+
+
+A: GtkContainer:border_width
+B: xthickness
+C: ythickness
+D: horizontal_padding
+E: toggle_size
+F: toggle_spacing
+G: Requested height of child (also used for width of arrow
+H: arrow_spacing spacing (when the item has a non-vertical submenu)
+
+
 =============
 
 GtkOptionMenu:
@@ -176,6 +271,11 @@ GtkButton
 
 =====================
 
+NOTE: Due to a bug that is basically unfixable in a sufficiently compatible
+NOTE: way, the button gives the space requested for focus_width and 
+NOTE: focus_padding to the child (in addition to the space requested by
+NOTE: the child), if the button is !CAN_FOCUS.
+
  Style properties
 
    GtkWidget::interior_focus = TRUE
@@ -592,3 +692,145 @@ D: INNER_BORDER + (HAVE_FOCUS ? 0 : GtkWidget::focus-line-width
 
 Note - effect here for !interior_focus is that bevel moves in
 by focus-line-width when entry gains focus
+
+===============
+
+GtkExpander
+
+===============
+
+ Style properties
+  GtkWidget::focus_line_width
+  GtkWidget::focus_padding
+  GtkExpander::expander_size
+  GtkExpander::expander_spacing
+
+ Properties
+  GtkContainer::border_width
+  GtkExpander::spacing
+
+if (GTK_WIDGET_VISIBLE (bin->child) && interior_focus)
+
++-------------------------------------+
+|                  A                  |
+| +---------+-----------------------+ |
+| |    C    |##########E############| |
+| | +-----+ |#+-------------------+#| |
+| | |     | |#|        F          |#| |
+| | |     | |#| +---------------+ |#| |
+|A|C| BxB |C|E|F| label_widget  |F|E|A|
+| | |     | |#| +---------------+ |#| |
+| | |     | |#|        F          |#| |
+| | +-----+ |#+-------------------+#| |
+| |    C    |##########E############| |
+| +---------+-----------------------+ |
+| |                D                | |
+| +---------------------------------+ |
+| |                                 | |
+| |                                 | |
+| |                                 | |
+|A|             bin->child          |A|
+| |                                 | |
+| |                                 | |
+| |                                 | |
+| +---------------------------------+ |
+|                  A                  |
++-------------------------------------+
+
+ A: GtkContainer::border_width
+ B: GtkExpander::expander_size
+ C: GtkExpander::expander_spacing
+ D: GtkExpander::spacing
+ E: GtkWidget::focus_line_width
+ F: GtkWidget::focus_padding
+
+if (GTK_WIDGET_VISIBLE (bin->child) && !interior_focus)
+
++-------------------------------------------+
+|                    A                      |
+| +---------------------------------------+ |
+| |##################E####################| |
+| |#+-----------------------------------+#| |
+| |#|                F                  |#| |
+| |#| +---------+---------------------+ |#| |
+| |#| |    C    |                     | |#| |
+| |#| | +-----+ |                     | |#| |
+|A|E|F|C| BxB |C|    label_widget     |F|E|A|
+| |#| | +-----+ |                     | |#| |
+| |#| |    C    |                     | |#| |
+| |#| +---------+---------------------+ |#| |
+| |#|                F                  |#| |
+| |#+-----------------------------------+#| |
+| |##################E####################| |
+| +---------------------------------------+ |
+| |                  D                    | |
+| +---------------------------------------+ |
+| |                                       | |
+| |                                       | |
+| |                                       | |
+|A|               bin->child              |A|
+| |                                       | |
+| |                                       | |
+| |                                       | |
+| +---------------------------------------+ |
+|                     A                     |
++-------------------------------------------+
+
+ A: GtkContainer::border_width
+ B: GtkExpander::expander_size
+ C: GtkExpander::expander_spacing
+ D: GtkExpander::spacing
+ E: GtkWidget::focus_line_width
+ F: GtkWidget::focus_padding
+
+if (!GTK_WIDGET_VISIBLE (bin->child) && interior_focus)
+
++-------------------------------------+
+|                  A                  |
+| +---------+-----------------------+ |
+| |    C    |##########E############| |
+| | +-----+ |#+-------------------+#| |
+| | |     | |#|        F          |#| |
+| | |     | |#| +---------------+ |#| |
+|A|C| BxB |C|E|F| label_widget  |F|E|A|
+| | |     | |#| +---------------+ |#| |
+| | |     | |#|        F          |#| |
+| | +-----+ |#+-------------------+#| |
+| |    C    |##########E############| |
+| +---------+-----------------------+ |
+|                  A                  |
++-------------------------------------+
+
+ A: GtkContainer::border_width
+ B: GtkExpander::expander_size
+ C: GtkExpander::expander_spacing
+ E: GtkWidget::focus_line_width
+ F: GtkWidget::focus_padding
+
+if (!GTK_WIDGET_VISIBLE (bin->child) && !interior_focus)
+
++-------------------------------------------+
+|                    A                      |
+| +---------------------------------------+ |
+| |##################E####################| |
+| |#+-----------------------------------+#| |
+| |#|                F                  |#| |
+| |#| +---------+---------------------+ |#| |
+| |#| |    C    |                     | |#| |
+| |#| | +-----+ |                     | |#| |
+|A|E|F|C| BxB |C|     label_widget    |F|E|A|
+| |#| | +-----+ |                     | |#| |
+| |#| |    C    |                     | |#| |
+| |#| +---------+---------------------+ |#| |
+| |#|                F                  |#| |
+| |#+-----------------------------------+#| |
+| |##################E####################| |
+| +---------------------------------------+ |
+|                    A                      |
++-------------------------------------------+
+
+ A: GtkContainer::border_width
+ B: GtkExpander::expander_size
+ C: GtkExpander::expander_spacing
+ E: GtkWidget::focus_line_width
+ F: GtkWidget::focus_padding