~ubuntu-branches/ubuntu/raring/wxwidgets2.8/raring

« back to all changes in this revision

Viewing changes to wxPython/wx/tools/Editra/src/extern/aui/tabart.py

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-01-07 13:59:25 UTC
  • mfrom: (1.1.9) (5.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120107135925-2601miy9ullcon9j
Tags: 2.8.12.1-6ubuntu1
* Resync from Debian, changes that were kept:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control: Build-dep on libxt-dev for mediactrl.
  - Patches
    + fix-bashism-in-example
* Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to python-wxversion
  to guarantee upgrade ordering when moving from pycentral to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        self._tab_ctrl_height = 0
115
115
        self._buttonRect = wx.Rect()
116
116
 
117
 
        base_colour = GetBaseColour()
118
 
    
119
 
        self._base_colour = base_colour
120
 
        border_colour = StepColour(base_colour, 75)
121
 
 
122
 
        self._border_pen = wx.Pen(border_colour)
123
 
        self._base_colour_pen = wx.Pen(self._base_colour)
124
 
        self._base_colour_brush = wx.Brush(self._base_colour)
 
117
        self.SetDefaultColours()
125
118
 
126
119
        if wx.Platform == "__WXMAC__":
127
120
            bmp_colour = wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DDKSHADOW)
158
151
            self._focusPen = wx.Pen(wx.BLACK, 1, wx.USER_DASH)
159
152
            self._focusPen.SetDashes([1, 1])
160
153
            self._focusPen.SetCap(wx.CAP_BUTT)
 
154
            
 
155
            
 
156
    def SetBaseColour(self, base_colour):
 
157
        """
 
158
        Sets a new base colour.
 
159
 
 
160
        :param `base_colour`: an instance of `wx.Colour`.
 
161
        """
 
162
        
 
163
        self._base_colour = base_colour
 
164
        self._base_colour_pen = wx.Pen(self._base_colour)
 
165
        self._base_colour_brush = wx.Brush(self._base_colour)
 
166
 
 
167
 
 
168
    def SetDefaultColours(self, base_colour=None):
 
169
        """
 
170
        Sets the default colours, which are calculated from the given base colour.
 
171
 
 
172
        :param `base_colour`: an instance of `wx.Colour`. If defaulted to ``None``, a colour
 
173
         is generated accordingly to the platform and theme.
 
174
        """
 
175
 
 
176
        if base_colour is None:
 
177
            base_colour = GetBaseColour()
 
178
 
 
179
        self.SetBaseColour( base_colour )
 
180
        self._border_colour = StepColour(base_colour, 75)
 
181
        self._border_pen = wx.Pen(self._border_colour)
 
182
 
 
183
        self._background_top_colour = StepColour(self._base_colour, 90)
 
184
        self._background_bottom_colour = StepColour(self._base_colour, 170)
 
185
        
 
186
        self._tab_top_colour = self._base_colour
 
187
        self._tab_bottom_colour = wx.WHITE
 
188
        self._tab_gradient_highlight_colour = wx.WHITE
 
189
 
 
190
        self._tab_inactive_top_colour = self._base_colour
 
191
        self._tab_inactive_bottom_colour = StepColour(self._tab_inactive_top_colour, 160)
 
192
        
 
193
        self._tab_text_colour = lambda page: page.text_colour
 
194
        self._tab_disabled_text_colour = wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT)
161
195
 
162
196
 
163
197
    def Clone(self):
164
198
        """ Clones the art object. """
165
199
 
166
 
        art = AuiDefaultTabArt()
 
200
        art = type(self)()
167
201
        art.SetNormalFont(self.GetNormalFont())
168
202
        art.SetSelectedFont(self.GetSelectedFont())
169
203
        art.SetMeasuringFont(self.GetMeasuringFont())
184
218
         ``AUI_NB_TOP``                       With this style, tabs are drawn along the top of the notebook
185
219
         ``AUI_NB_LEFT``                      With this style, tabs are drawn along the left of the notebook. Not implemented yet.
186
220
         ``AUI_NB_RIGHT``                     With this style, tabs are drawn along the right of the notebook. Not implemented yet.
187
 
         ``AUI_NB_BOTTOM``                    With this style, tabs are drawn along the bottom of the notebook.
 
221
         ``AUI_NB_BOTTOM``                    With this style, tabs are drawn along the bottom of the notebook
188
222
         ``AUI_NB_TAB_SPLIT``                 Allows the tab control to be split by dragging a tab
189
223
         ``AUI_NB_TAB_MOVE``                  Allows a tab to be moved horizontally by dragging
190
224
         ``AUI_NB_TAB_EXTERNAL_MOVE``         Allows a tab to be moved to another tab control
194
228
         ``AUI_NB_CLOSE_BUTTON``              With this style, a close button is available on the tab bar
195
229
         ``AUI_NB_CLOSE_ON_ACTIVE_TAB``       With this style, a close button is available on the active tab
196
230
         ``AUI_NB_CLOSE_ON_ALL_TABS``         With this style, a close button is available on all tabs
197
 
         ``AUI_NB_MIDDLE_CLICK_CLOSE``        Allows to close AuiNotebook tabs by mouse middle button click
198
 
         ``AUI_NB_SUB_NOTEBOOK``              This style is used by AuiManager to create automatic AuiNotebooks
 
231
         ``AUI_NB_MIDDLE_CLICK_CLOSE``        Allows to close L{AuiNotebook} tabs by mouse middle button click
 
232
         ``AUI_NB_SUB_NOTEBOOK``              This style is used by L{AuiManager} to create automatic AuiNotebooks
199
233
         ``AUI_NB_HIDE_ON_SINGLE_TAB``        Hides the tab window if only one tab is present
200
 
         ``AUI_NB_SMART_TABS``                Use Smart Tabbing, like ``Alt``+``Tab`` on Windows
 
234
         ``AUI_NB_SMART_TABS``                Use Smart Tabbing, like ``Alt`` + ``Tab`` on Windows
201
235
         ``AUI_NB_USE_IMAGES_DROPDOWN``       Uses images on dropdown window list menu instead of check items
202
236
         ``AUI_NB_CLOSE_ON_TAB_LEFT``         Draws the tab close button on the left instead of on the right (a la Camino browser)
203
237
         ``AUI_NB_TAB_FLOAT``                 Allows the floating of single tabs. Known limitation: when the notebook is more or less full screen, tabs cannot be dragged far enough outside of the notebook to become floating pages
204
238
         ``AUI_NB_DRAW_DND_TAB``              Draws an image representation of a tab while dragging (on by default)
 
239
         ``AUI_NB_ORDER_BY_ACCESS``           Tab navigation order by last access time for the tabs
 
240
         ``AUI_NB_NO_TAB_FOCUS``              Don't draw tab focus rectangle
205
241
         ==================================== ==================================
206
242
        
207
243
        """
225
261
        
226
262
        :param `tab_ctrl_size`: the size of the tab control area;
227
263
        :param `tab_count`: the number of tabs;
228
 
        :param `minMaxTabWidth`: the minimum and maximum tab widths to be used
229
 
         when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
 
264
        :param `minMaxTabWidth`: a tuple containing the minimum and maximum tab widths
 
265
         to be used when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
230
266
        """
231
267
        
232
268
        self._fixed_tab_width = 100
281
317
        else: #for AUI_NB_TOP
282
318
            r = wx.Rect(rect.x, rect.y, rect.width+2, rect.height-3)
283
319
 
284
 
        top_colour = StepColour(self._base_colour, 90)
285
 
        bottom_colour = StepColour(self._base_colour, 170)
286
 
 
287
 
        dc.GradientFillLinear(r, top_colour, bottom_colour, wx.SOUTH)
 
320
        dc.GradientFillLinear(r, self._background_top_colour, self._background_bottom_colour, wx.SOUTH)
288
321
 
289
322
        # draw base lines
290
323
 
293
326
        w = rect.GetWidth()
294
327
 
295
328
        if agwFlags & AUI_NB_BOTTOM:
296
 
            dc.SetBrush(wx.Brush(bottom_colour))
 
329
            dc.SetBrush(wx.Brush(self._background_bottom_colour))
297
330
            dc.DrawRectangle(-1, 0, w+2, 4)
298
331
 
299
332
        # TODO: else if (agwFlags & AUI_NB_LEFT) 
353
386
            textx, texty = normal_textx, normal_texty
354
387
 
355
388
        if not page.enabled:
356
 
            dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT))
 
389
            dc.SetTextForeground(self._tab_disabled_text_colour)
357
390
            pagebitmap = page.dis_bitmap
358
391
        else:
359
 
            dc.SetTextForeground(page.text_colour)
 
392
            dc.SetTextForeground(self._tab_text_colour(page))
360
393
            pagebitmap = page.bitmap
361
394
            
362
395
        # create points that will make the tab outline
407
440
            dc.DrawRectangle(r.x+1, r.y+1, r.width-1, r.height-4)
408
441
 
409
442
            # this white helps fill out the gradient at the top of the tab
410
 
            dc.SetPen(wx.WHITE_PEN)
411
 
            dc.SetBrush(wx.WHITE_BRUSH)
 
443
            dc.SetPen( wx.Pen(self._tab_gradient_highlight_colour) )
 
444
            dc.SetBrush( wx.Brush(self._tab_gradient_highlight_colour) )
412
445
            dc.DrawRectangle(r.x+2, r.y+1, r.width-3, r.height-4)
413
446
 
414
447
            # these two points help the rounded corners appear more antialiased
424
457
            r.y -= 2
425
458
 
426
459
            # draw gradient background
427
 
            top_colour = wx.WHITE
428
 
            bottom_colour = self._base_colour
 
460
            top_colour = self._tab_bottom_colour
 
461
            bottom_colour = self._tab_top_colour
429
462
            dc.GradientFillLinear(r, bottom_colour, top_colour, wx.NORTH)
430
463
        
431
464
        else:
444
477
            r.height -= 1
445
478
 
446
479
            # -- draw top gradient fill for glossy look
447
 
            top_colour = self._base_colour
448
 
            bottom_colour = StepColour(top_colour, 160)
 
480
            top_colour = self._tab_inactive_top_colour
 
481
            bottom_colour = self._tab_inactive_bottom_colour
449
482
            dc.GradientFillLinear(r, bottom_colour, top_colour, wx.NORTH)
450
483
 
451
484
            r.y += r.height
452
485
            r.y -= 1
453
486
 
454
487
            # -- draw bottom fill for glossy look
455
 
            top_colour = self._base_colour
456
 
            bottom_colour = self._base_colour
 
488
            top_colour = self._tab_inactive_bottom_colour
 
489
            bottom_colour = self._tab_inactive_bottom_colour
457
490
            dc.GradientFillLinear(r, top_colour, bottom_colour, wx.SOUTH)
458
491
        
459
492
        # draw tab outline
466
499
        if page.active:
467
500
        
468
501
            if agwFlags & AUI_NB_BOTTOM:
469
 
                dc.SetPen(wx.Pen(StepColour(self._base_colour, 170)))
 
502
                dc.SetPen(wx.Pen(self._background_bottom_colour))
470
503
                
471
504
            # TODO: else if (agwFlags & AUI_NB_LEFT) 
472
505
            # TODO: else if (agwFlags & AUI_NB_RIGHT) 
534
567
        dc.DrawLabel(draw_text, wx.Rect(text_offset, ypos, rectx, recty))
535
568
 
536
569
        # draw focus rectangle
537
 
        self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff, drawn_tab_height, textx, texty)
 
570
        if (agwFlags & AUI_NB_NO_TAB_FOCUS) == 0:
 
571
            self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff, drawn_tab_height, rectx, recty)
538
572
        
539
573
        out_button_rect = wx.Rect()
540
574
        
757
791
        :param `texty`: the y text extent.
758
792
        """
759
793
 
 
794
        if self.GetAGWFlags() & AUI_NB_NO_TAB_FOCUS:
 
795
            return
 
796
        
760
797
        if page.active and wx.Window.FindFocus() == wnd:
761
798
        
762
799
            focusRectText = wx.Rect(text_offset, (drawn_tab_yoff + (drawn_tab_height)/2 - (texty/2)),
989
1026
    def Clone(self):
990
1027
        """ Clones the art object. """
991
1028
 
992
 
        art = AuiSimpleTabArt()
 
1029
        art = type(self)()
993
1030
        art.SetNormalFont(self.GetNormalFont())
994
1031
        art.SetSelectedFont(self.GetSelectedFont())
995
1032
        art.SetMeasuringFont(self.GetMeasuringFont())
1010
1047
         ``AUI_NB_TOP``                       With this style, tabs are drawn along the top of the notebook
1011
1048
         ``AUI_NB_LEFT``                      With this style, tabs are drawn along the left of the notebook. Not implemented yet.
1012
1049
         ``AUI_NB_RIGHT``                     With this style, tabs are drawn along the right of the notebook. Not implemented yet.
1013
 
         ``AUI_NB_BOTTOM``                    With this style, tabs are drawn along the bottom of the notebook.
 
1050
         ``AUI_NB_BOTTOM``                    With this style, tabs are drawn along the bottom of the notebook
1014
1051
         ``AUI_NB_TAB_SPLIT``                 Allows the tab control to be split by dragging a tab
1015
1052
         ``AUI_NB_TAB_MOVE``                  Allows a tab to be moved horizontally by dragging
1016
1053
         ``AUI_NB_TAB_EXTERNAL_MOVE``         Allows a tab to be moved to another tab control
1020
1057
         ``AUI_NB_CLOSE_BUTTON``              With this style, a close button is available on the tab bar
1021
1058
         ``AUI_NB_CLOSE_ON_ACTIVE_TAB``       With this style, a close button is available on the active tab
1022
1059
         ``AUI_NB_CLOSE_ON_ALL_TABS``         With this style, a close button is available on all tabs
1023
 
         ``AUI_NB_MIDDLE_CLICK_CLOSE``        Allows to close AuiNotebook tabs by mouse middle button click
1024
 
         ``AUI_NB_SUB_NOTEBOOK``              This style is used by AuiManager to create automatic AuiNotebooks
 
1060
         ``AUI_NB_MIDDLE_CLICK_CLOSE``        Allows to close L{AuiNotebook} tabs by mouse middle button click
 
1061
         ``AUI_NB_SUB_NOTEBOOK``              This style is used by L{AuiManager} to create automatic AuiNotebooks
1025
1062
         ``AUI_NB_HIDE_ON_SINGLE_TAB``        Hides the tab window if only one tab is present
1026
 
         ``AUI_NB_SMART_TABS``                Use Smart Tabbing, like ``Alt``+``Tab`` on Windows
 
1063
         ``AUI_NB_SMART_TABS``                Use Smart Tabbing, like ``Alt`` + ``Tab`` on Windows
1027
1064
         ``AUI_NB_USE_IMAGES_DROPDOWN``       Uses images on dropdown window list menu instead of check items
1028
1065
         ``AUI_NB_CLOSE_ON_TAB_LEFT``         Draws the tab close button on the left instead of on the right (a la Camino browser)
1029
1066
         ``AUI_NB_TAB_FLOAT``                 Allows the floating of single tabs. Known limitation: when the notebook is more or less full screen, tabs cannot be dragged far enough outside of the notebook to become floating pages
1030
1067
         ``AUI_NB_DRAW_DND_TAB``              Draws an image representation of a tab while dragging (on by default)
 
1068
         ``AUI_NB_ORDER_BY_ACCESS``           Tab navigation order by last access time for the tabs
 
1069
         ``AUI_NB_NO_TAB_FOCUS``              Don't draw tab focus rectangle
1031
1070
         ==================================== ==================================
1032
1071
        
1033
1072
        """
1051
1090
        
1052
1091
        :param `tab_ctrl_size`: the size of the tab control area;
1053
1092
        :param `tab_count`: the number of tabs;
1054
 
        :param `minMaxTabWidth`: the minimum and maximum tab widths to be used
1055
 
         when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
 
1093
        :param `minMaxTabWidth`: a tuple containing the minimum and maximum tab widths
 
1094
         to be used when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
1056
1095
        """
1057
1096
        
1058
1097
        self._fixed_tab_width = 100
1223
1262
            draw_text = ChopText(dc, caption,
1224
1263
                                 tab_width - (text_offset-tab_x) - close_button_width)
1225
1264
 
1226
 
 
1227
1265
        ypos = (tab_y + tab_height)/2 - (texty/2) + 1
1228
1266
 
1229
1267
        if control is not None:
1245
1283
        dc.DrawLabel(draw_text, wx.Rect(text_offset, ypos, rectx, recty))
1246
1284
 
1247
1285
        # draw focus rectangle
1248
 
        if page.active and wx.Window.FindFocus() == wnd:
 
1286
        if page.active and wx.Window.FindFocus() == wnd and (agwFlags & AUI_NB_NO_TAB_FOCUS) == 0:
1249
1287
        
1250
1288
            focusRect = wx.Rect(text_offset, ((tab_y + tab_height)/2 - (texty/2) + 1),
1251
1289
                                selected_textx, selected_texty)
1605
1643
    def Clone(self):
1606
1644
        """ Clones the art object. """
1607
1645
 
1608
 
        art = VC71TabArt()
 
1646
        art = type(self)()
1609
1647
        art.SetNormalFont(self.GetNormalFont())
1610
1648
        art.SetSelectedFont(self.GetSelectedFont())
1611
1649
        art.SetMeasuringFont(self.GetMeasuringFont())
1777
1815
        out_button_rect = wx.Rect()
1778
1816
 
1779
1817
        # draw focus rectangle
1780
 
        self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff+shift,
1781
 
                                drawn_tab_height+shift, textx, texty)
 
1818
        if (agwFlags & AUI_NB_NO_TAB_FOCUS) == 0:
 
1819
            self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff+shift,
 
1820
                                    drawn_tab_height+shift, rectx, recty)
1782
1821
                
1783
1822
        # draw 'x' on tab (if enabled)
1784
1823
        if close_button_state != AUI_BUTTON_STATE_HIDDEN:
1824
1863
    def Clone(self):
1825
1864
        """ Clones the art object. """
1826
1865
 
1827
 
        art = FF2TabArt()
 
1866
        art = type(self)()
1828
1867
        art.SetNormalFont(self.GetNormalFont())
1829
1868
        art.SetSelectedFont(self.GetSelectedFont())
1830
1869
        art.SetMeasuringFont(self.GetMeasuringFont())
2012
2051
        dc.DrawLabel(draw_text, wx.Rect(text_offset, ypos, rectx, recty))
2013
2052
 
2014
2053
        # draw focus rectangle
2015
 
        self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff+shift,
2016
 
                                drawn_tab_height, textx, texty)
 
2054
        if (agwFlags & AUI_NB_NO_TAB_FOCUS) == 0:
 
2055
            self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff+shift,
 
2056
                                    drawn_tab_height, rectx, recty)
2017
2057
        
2018
2058
        out_button_rect = wx.Rect()
2019
2059
        # draw 'x' on tab (if enabled)
2118
2158
    def Clone(self):
2119
2159
        """ Clones the art object. """
2120
2160
 
2121
 
        art = VC8TabArt()
 
2161
        art = type(self)()
2122
2162
        art.SetNormalFont(self.GetNormalFont())
2123
2163
        art.SetSelectedFont(self.GetSelectedFont())
2124
2164
        art.SetMeasuringFont(self.GetMeasuringFont())
2133
2173
        
2134
2174
        :param `tab_ctrl_size`: the size of the tab control area;
2135
2175
        :param `tab_count`: the number of tabs;
2136
 
        :param `minMaxTabWidth`: the minimum and maximum tab widths to be used
2137
 
         when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
 
2176
        :param `minMaxTabWidth`: a tuple containing the minimum and maximum tab widths
 
2177
         to be used when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
2138
2178
        """
2139
2179
        
2140
2180
        AuiDefaultTabArt.SetSizingInfo(self, tab_ctrl_size, tab_count, minMaxTabWidth)
2342
2382
        dc.DrawLabel(draw_text, wx.Rect(text_offset, ypos, rectx, recty))
2343
2383
        
2344
2384
        # draw focus rectangle
2345
 
        self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff+shift,
2346
 
                                drawn_tab_height+shift, textx, texty)
 
2385
        if (agwFlags & AUI_NB_NO_TAB_FOCUS) == 0:
 
2386
            self.DrawFocusRectangle(dc, page, wnd, draw_text, offset_focus, bitmap_offset, drawn_tab_yoff+shift,
 
2387
                                    drawn_tab_height+shift, rectx, recty)
2347
2388
        
2348
2389
        out_button_rect = wx.Rect()
2349
2390
        # draw 'x' on tab (if enabled)
2451
2492
         ``AUI_NB_TOP``                       With this style, tabs are drawn along the top of the notebook
2452
2493
         ``AUI_NB_LEFT``                      With this style, tabs are drawn along the left of the notebook. Not implemented yet.
2453
2494
         ``AUI_NB_RIGHT``                     With this style, tabs are drawn along the right of the notebook. Not implemented yet.
2454
 
         ``AUI_NB_BOTTOM``                    With this style, tabs are drawn along the bottom of the notebook.
 
2495
         ``AUI_NB_BOTTOM``                    With this style, tabs are drawn along the bottom of the notebook
2455
2496
         ``AUI_NB_TAB_SPLIT``                 Allows the tab control to be split by dragging a tab
2456
2497
         ``AUI_NB_TAB_MOVE``                  Allows a tab to be moved horizontally by dragging
2457
2498
         ``AUI_NB_TAB_EXTERNAL_MOVE``         Allows a tab to be moved to another tab control
2461
2502
         ``AUI_NB_CLOSE_BUTTON``              With this style, a close button is available on the tab bar
2462
2503
         ``AUI_NB_CLOSE_ON_ACTIVE_TAB``       With this style, a close button is available on the active tab
2463
2504
         ``AUI_NB_CLOSE_ON_ALL_TABS``         With this style, a close button is available on all tabs
2464
 
         ``AUI_NB_MIDDLE_CLICK_CLOSE``        Allows to close AuiNotebook tabs by mouse middle button click
2465
 
         ``AUI_NB_SUB_NOTEBOOK``              This style is used by AuiManager to create automatic AuiNotebooks
 
2505
         ``AUI_NB_MIDDLE_CLICK_CLOSE``        Allows to close L{AuiNotebook} tabs by mouse middle button click
 
2506
         ``AUI_NB_SUB_NOTEBOOK``              This style is used by L{AuiManager} to create automatic AuiNotebooks
2466
2507
         ``AUI_NB_HIDE_ON_SINGLE_TAB``        Hides the tab window if only one tab is present
2467
 
         ``AUI_NB_SMART_TABS``                Use Smart Tabbing, like ``Alt``+``Tab`` on Windows
 
2508
         ``AUI_NB_SMART_TABS``                Use Smart Tabbing, like ``Alt`` + ``Tab`` on Windows
2468
2509
         ``AUI_NB_USE_IMAGES_DROPDOWN``       Uses images on dropdown window list menu instead of check items
2469
2510
         ``AUI_NB_CLOSE_ON_TAB_LEFT``         Draws the tab close button on the left instead of on the right (a la Camino browser)
2470
2511
         ``AUI_NB_TAB_FLOAT``                 Allows the floating of single tabs. Known limitation: when the notebook is more or less full screen, tabs cannot be dragged far enough outside of the notebook to become floating pages
2471
2512
         ``AUI_NB_DRAW_DND_TAB``              Draws an image representation of a tab while dragging (on by default)
 
2513
         ``AUI_NB_ORDER_BY_ACCESS``           Tab navigation order by last access time for the tabs
 
2514
         ``AUI_NB_NO_TAB_FOCUS``              Don't draw tab focus rectangle
2472
2515
         ==================================== ==================================
2473
2516
 
2474
2517
        :note: Overridden from L{AuiDefaultTabArt}.
2510
2553
    def Clone(self):
2511
2554
        """ Clones the art object. """
2512
2555
 
2513
 
        art = ChromeTabArt()
 
2556
        art = type(self)()
2514
2557
        art.SetNormalFont(self.GetNormalFont())
2515
2558
        art.SetSelectedFont(self.GetSelectedFont())
2516
2559
        art.SetMeasuringFont(self.GetMeasuringFont())
2525
2568
        
2526
2569
        :param `tab_ctrl_size`: the size of the tab control area;
2527
2570
        :param `tab_count`: the number of tabs;
2528
 
        :param `minMaxTabWidth`: the minimum and maximum tab widths to be used
2529
 
         when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
 
2571
        :param `minMaxTabWidth`: a tuple containing the minimum and maximum tab widths
 
2572
         to be used when the ``AUI_NB_TAB_FIXED_WIDTH`` style is active.
2530
2573
        """
2531
2574
        
2532
2575
        AuiDefaultTabArt.SetSizingInfo(self, tab_ctrl_size, tab_count, minMaxTabWidth)