File: wx.lib.agw.foldpanelbar.CaptionBarStyle.txt

package info (click to toggle)
wxpython4.0 4.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 232,540 kB
  • sloc: cpp: 958,937; python: 233,059; ansic: 150,441; makefile: 51,662; sh: 8,687; perl: 1,563; javascript: 584; php: 326; xml: 200
file content (247 lines) | stat: -rw-r--r-- 10,133 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.foldpanelbar

.. highlight:: python



.. _wx.lib.agw.foldpanelbar.CaptionBarStyle:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.foldpanelbar.CaptionBarStyle**
==========================================================================================================================================

This class encapsulates the styles you wish to set for the
:class:`CaptionBar` (this is the part of the `FoldPanel` where the caption
is displayed). It can either be applied at creation time be
reapplied when styles need to be changed.

At construction time, all styles are set to their default
transparency.  This means none of the styles will be applied to
the :class:`CaptionBar` in question, meaning it will be created using the
default internals. When setting i.e the colour, font or panel
style, these styles become active to be used.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>CaptionBarStyle</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.agw.foldpanelbar.CaptionBarStyle_inheritance.png" alt="Inheritance diagram of CaptionBarStyle" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.foldpanelbar.CaptionBarStyle.html" title="wx.lib.agw.foldpanelbar.CaptionBarStyle" alt="" coords="5,5,291,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.__init__`                        Default constructor for this class.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.CaptionColourUsed`               Checks if the caption colour of the caption bar is set.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.CaptionFontUsed`                 Checks if the caption bar font is set.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.CaptionStyleUsed`                Checks if the caption style of the caption bar is set.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.FirstColourUsed`                 Checks if the first colour of the caption bar is set.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.GetCaptionColour`                Returns the caption colour for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.GetCaptionFont`                  Returns the font for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.GetCaptionStyle`                 Returns the caption style for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.GetFirstColour`                  Returns the first colour for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.GetSecondColour`                 Returns the second colour for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.ResetDefaults`                   Resets default :class:`CaptionBarStyle`.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.SecondColourUsed`                Checks if the second colour of the caption bar is set.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.SetCaptionColour`                Sets caption colour for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.SetCaptionFont`                  Sets font for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.SetCaptionStyle`                 Sets caption style for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.SetFirstColour`                  Sets first colour for the caption bar.
:meth:`~wx.lib.agw.foldpanelbar.CaptionBarStyle.SetSecondColour`                 Sets second colour for the caption bar.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: CaptionBarStyle(object)

   This class encapsulates the styles you wish to set for the
   :class:`CaptionBar` (this is the part of the `FoldPanel` where the caption
   is displayed). It can either be applied at creation time be
   reapplied when styles need to be changed.
   
   At construction time, all styles are set to their default
   transparency.  This means none of the styles will be applied to
   the :class:`CaptionBar` in question, meaning it will be created using the
   default internals. When setting i.e the colour, font or panel
   style, these styles become active to be used.

   .. method:: __init__(self)

      Default constructor for this class. 


   .. method:: CaptionColourUsed(self)

      Checks if the caption colour of the caption bar is set.


   .. method:: CaptionFontUsed(self)

      Checks if the caption bar font is set. 


   .. method:: CaptionStyleUsed(self)

      Checks if the caption style of the caption bar is set.


   .. method:: FirstColourUsed(self)

      Checks if the first colour of the caption bar is set.


   .. method:: GetCaptionColour(self)

      Returns the caption colour for the caption bar.
      
      :note: Please be warned this will result in an assertion failure
       when this property is not previously set.
      
      :see: :meth:`~CaptionBarStyle.SetCaptionColour`, :meth:`~CaptionBarStyle.CaptionColourUsed`


   .. method:: GetCaptionFont(self)

      Returns the font for the caption bar.
      
      :note: Please be warned this will result in an assertion failure when
       this property is not previously set.
      
      :see: :meth:`~CaptionBarStyle.SetCaptionFont`, :meth:`~CaptionBarStyle.CaptionFontUsed`


   .. method:: GetCaptionStyle(self)

      Returns the caption style for the caption bar.
      
      :note: Please be warned this will result in an assertion failure
       when this property is not previously set.
      
      :see: :meth:`~CaptionBarStyle.SetCaptionStyle`, :meth:`~CaptionBarStyle.CaptionStyleUsed`


   .. method:: GetFirstColour(self)

      Returns the first colour for the caption bar.
      
      :note: Please be warned this will result in an assertion failure when
       this property is not previously set.
      
      :see: :meth:`~CaptionBarStyle.SetFirstColour`, :meth:`~CaptionBarStyle.FirstColourUsed`


   .. method:: GetSecondColour(self)

      Returns the second colour for the caption bar.
      
      :note: Please be warned this will result in an assertion failure when
       this property is not previously set.
      
      :see: :meth:`~CaptionBarStyle.SetSecondColour`, :meth:`~CaptionBarStyle.SecondColourUsed`


   .. method:: ResetDefaults(self)

      Resets default :class:`CaptionBarStyle`. 


   .. method:: SecondColourUsed(self)

      Checks if the second colour of the caption bar is set.


   .. method:: SetCaptionColour(self, colour)

      Sets caption colour for the caption bar.
      
      :param `colour`: a valid :class:`wx.Colour` object.
      
      :note: If this is not set, the colour property is undefined and will not be used.
       Use :meth:`~CaptionBarStyle.CaptionColourUsed` to check if this style is used.


   .. method:: SetCaptionFont(self, font)

      Sets font for the caption bar.
      
      :param `font`: a valid :class:`wx.Font` object.
      
      :note: If this is not set, the font property is undefined and will not be used.
       Use :meth:`~CaptionBarStyle.CaptionFontUsed` to check if this style is used.


   .. method:: SetCaptionStyle(self, style)

      Sets caption style for the caption bar.
      
      :param `style`: can be one of the following bits:
      
       =============================== ======= =============================
       Caption Style                    Value  Description
       =============================== ======= =============================
       ``CAPTIONBAR_GRADIENT_V``             1 Draws a vertical gradient from top to bottom
       ``CAPTIONBAR_GRADIENT_H``             2 Draws a horizontal gradient from left to right
       ``CAPTIONBAR_SINGLE``                 3 Draws a single filled rectangle to draw the caption
       ``CAPTIONBAR_RECTANGLE``              4 Draws a single colour with a rectangle around the caption
       ``CAPTIONBAR_FILLED_RECTANGLE``       5 Draws a filled rectangle and a border around it
       =============================== ======= =============================
      
      :note: If this is not set, the property is undefined and will not be used.
       Use :meth:`~CaptionBarStyle.CaptionStyleUsed` to check if this style is used.


   .. method:: SetFirstColour(self, colour)

      Sets first colour for the caption bar.
      
      :param `colour`: a valid :class:`wx.Colour` object.
      
      :note: If this is not set, the colour property is undefined and will not be used.
       Use :meth:`~CaptionBarStyle.FirstColourUsed` to check if this style is used.


   .. method:: SetSecondColour(self, colour)

      Sets second colour for the caption bar.
      
      :param `colour`: a valid :class:`wx.Colour` object.
      
      :note: If this is not set, the colour property is undefined and will not be used.
       Use :meth:`~CaptionBarStyle.SecondColourUsed` to check if this style is used.