docs/widget.rst
changeset 13 19ebde2fd594
parent 12 bb7d41be0c44
child 38 c6e170452c7f
equal deleted inserted replaced
12:bb7d41be0c44 13:19ebde2fd594
     1 Widget
     1 Widget
     2 ======
     2 ======
     3 
     3 
     4 .. toctree::
     4 .. toctree::
     5    :maxdepth: 2
     5    :maxdepth: 3
       
     6    :titlesonly:
     6 
     7 
     7    container
     8    container
     8    button
     9    button
     9 
    10 
    10 .. py:module:: tuikit.widget
    11 .. autoclass:: tuikit.widget.Widget
       
    12    :members:
       
    13    :show-inheritance:
    11 
    14 
       
    15    .. attribute:: x
       
    16                   y
       
    17       
       
    18       Position inside parent widget. Modified by layout manager.
       
    19    
       
    20    .. attribute:: width
       
    21                   height
       
    22       
       
    23       Actual size. Modified by layout manager.
    12 
    24 
    13 Class attributes
       
    14 ----------------
       
    15 
       
    16 .. attribute:: Widget.parent
       
    17 
       
    18    Parrent widget.
       
    19 
       
    20 
       
    21 .. attribute:: Widget.top
       
    22 
       
    23    Top widget (same for every widget in one application).
       
    24 
       
    25 
       
    26 .. attribute:: Widget.x
       
    27                Widget.y
       
    28 
       
    29    Position inside parent widget. Modified by layout manager.
       
    30 
       
    31 
       
    32 .. attribute:: Widget.width
       
    33                Widget.height
       
    34 
       
    35    Actual size. Modified by layout manager.
       
    36 
       
    37 
       
    38 .. attribute:: Widget.sizemin
       
    39 
       
    40    Minimal size of widget. Under normal circumstances, widget will never be sized smaller than this.
       
    41    Tuple (w, h). Both must be integers >= 1.
       
    42 
       
    43 
       
    44 .. attribute:: Widget.sizemax
       
    45 
       
    46    Maximum size of widget. Widget will never be sized bigger than this.
       
    47    Tuple (w, h). Integers >= 1 or None (meaning no maximum size or infinite).
       
    48 
       
    49 
       
    50 .. attribute:: Widget.sizereq
       
    51 
       
    52    Size request. This is default size of the widget. Will be fulfilled if possible.
       
    53    Tuple (w, h). Integers >= 1 or None (meaning use minumal size).
       
    54 
       
    55 
       
    56 .. attribute:: Widget.hidden
       
    57 
       
    58    Hidden widget does not affect layout.
       
    59 
       
    60 
       
    61 .. attribute:: Widget.allowlayout
       
    62 
       
    63    When false, the widget is not considered in layout.
       
    64 
       
    65 
       
    66 .. attribute:: Widget.layouthints
       
    67 
       
    68    Dictionary containing optional parameters for layout managers.
       
    69 
       
    70