mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 21:10:06 +01:00
Merge branch 'wernerfb-june-agw' into wip
This is a modified version of PR #80
This commit is contained in:
@@ -610,8 +610,8 @@ class SettingsPanel(wx.Panel):
|
||||
def CreateColourBitmap(self, c):
|
||||
|
||||
image = wx.Image(25, 14)
|
||||
for x in xrange(25):
|
||||
for y in xrange(14):
|
||||
for x in range(25):
|
||||
for y in range(14):
|
||||
pixcol = c
|
||||
if x == 0 or x == 24 or y == 0 or y == 13:
|
||||
pixcol = wx.BLACK
|
||||
|
||||
@@ -17,7 +17,7 @@ sys.path.append(os.path.split(dirName)[0])
|
||||
try:
|
||||
from agw import ribbon as RB
|
||||
except ImportError: # if it's not there locally, try the wxPython lib.
|
||||
import wx.lib.agw.ribbon as RB
|
||||
import wx.lib.agw.ribbon as RB
|
||||
|
||||
from wx.lib.embeddedimage import PyEmbeddedImage
|
||||
|
||||
|
||||
452
unittests/test_lib_agw_aui.py
Normal file
452
unittests/test_lib_agw_aui.py
Normal file
@@ -0,0 +1,452 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import os
|
||||
|
||||
import wx.lib.agw.aui as aui
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_agw_aui_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_agw_auiCtor(self):
|
||||
self._mgr = aui.AuiManager()
|
||||
|
||||
# tell AuiManager to manage this frame
|
||||
self._mgr.SetManagedWindow(self.frame)
|
||||
|
||||
pane = wx.Panel()
|
||||
self._mgr.AddPane(pane, aui.AuiPaneInfo().Name("pane1").Caption("A pane")
|
||||
.CenterPane())
|
||||
pane = wx.Panel()
|
||||
self._mgr.AddPane(pane, aui.AuiPaneInfo().Name("pane2").Caption("A pane")
|
||||
.Top())
|
||||
pane = wx.Panel()
|
||||
self._mgr.AddPane(pane, aui.AuiPaneInfo().Name("pane3").Caption("A pane")
|
||||
.Left())
|
||||
pane = wx.Panel()
|
||||
self._mgr.AddPane(pane, aui.AuiPaneInfo().Name("pane4").Caption("A pane")
|
||||
.Bottom())
|
||||
self._mgr.Update()
|
||||
|
||||
def tearDown(self):
|
||||
self._mgr.UnInit()
|
||||
|
||||
|
||||
class lib_agw_aui_additional_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_agw_aui_ToolbarCtor(self):
|
||||
tb = aui.AuiToolBar(self.frame, -1, wx.DefaultPosition, wx.DefaultSize,
|
||||
agwStyle=aui.AUI_TB_OVERFLOW | aui.AUI_TB_VERT_TEXT)
|
||||
tb_bmp1 = wx.ArtProvider.GetBitmap(wx.ART_QUESTION, wx.ART_OTHER, wx.Size(16, 16))
|
||||
tb.AddSimpleTool(-1, "Test", tb_bmp1)
|
||||
tb.AddSimpleTool(-1, "Check 1", tb_bmp1, "Check 1", aui.ITEM_CHECK)
|
||||
tb.AddSimpleTool(-1, "Radio 1", tb_bmp1, "Radio 1", aui.ITEM_RADIO)
|
||||
tb.AddSeparator()
|
||||
|
||||
# prepare a few custom overflow elements for the toolbars' overflow buttons
|
||||
|
||||
prepend_items, append_items = [], []
|
||||
item = aui.AuiToolBarItem()
|
||||
|
||||
item.SetKind(wx.ITEM_SEPARATOR)
|
||||
append_items.append(item)
|
||||
|
||||
item = aui.AuiToolBarItem()
|
||||
item.SetKind(wx.ITEM_NORMAL)
|
||||
item.SetId(-1)
|
||||
item.SetLabel("Customize...")
|
||||
append_items.append(item)
|
||||
tb.SetCustomOverflowItems(prepend_items, append_items)
|
||||
tb.Realize()
|
||||
|
||||
|
||||
def test_lib_agw_auiEvents(self):
|
||||
aui.EVT_AUI_PANE_BUTTON
|
||||
""" Fires an event when the user left-clicks on a pane button. """
|
||||
aui.EVT_AUI_PANE_CLOSE
|
||||
""" A pane in `AuiManager` has been closed. """
|
||||
aui.EVT_AUI_PANE_MAXIMIZE
|
||||
""" A pane in `AuiManager` has been maximized. """
|
||||
aui.EVT_AUI_PANE_RESTORE
|
||||
""" A pane in `AuiManager` has been restored from a maximized state. """
|
||||
aui.EVT_AUI_RENDER
|
||||
""" Fires an event every time the AUI frame is being repainted. """
|
||||
aui.EVT_AUI_FIND_MANAGER
|
||||
""" Used to find which AUI manager is controlling a certain pane. """
|
||||
aui.EVT_AUI_PANE_MINIMIZE
|
||||
""" A pane in `AuiManager` has been minimized. """
|
||||
aui.EVT_AUI_PANE_MIN_RESTORE
|
||||
""" A pane in `AuiManager` has been restored from a minimized state. """
|
||||
aui.EVT_AUI_PANE_FLOATING
|
||||
""" A pane in `AuiManager` is about to be floated. """
|
||||
aui.EVT_AUI_PANE_FLOATED
|
||||
""" A pane in `AuiManager` has been floated. """
|
||||
aui.EVT_AUI_PANE_DOCKING
|
||||
""" A pane in `AuiManager` is about to be docked. """
|
||||
aui.EVT_AUI_PANE_DOCKED
|
||||
""" A pane in `AuiManager` has been docked. """
|
||||
aui.EVT_AUI_PANE_ACTIVATED
|
||||
""" A pane in `AuiManager` has been activated. """
|
||||
aui.EVT_AUI_PERSPECTIVE_CHANGED
|
||||
""" The layout in `AuiManager` has been changed. """
|
||||
|
||||
def test_lib_agw_auiConstantsExist(self):
|
||||
|
||||
# For auibook
|
||||
# -----------
|
||||
aui.AuiBaseTabCtrlId
|
||||
""" Base window identifier for AuiTabCtrl. """
|
||||
|
||||
aui.AUI_NB_TOP
|
||||
""" With this style, tabs are drawn along the top of the notebook. """
|
||||
aui.AUI_NB_LEFT
|
||||
""" With this style, tabs are drawn along the left of the notebook.
|
||||
Not implemented yet. """
|
||||
aui.AUI_NB_RIGHT
|
||||
""" With this style, tabs are drawn along the right of the notebook.
|
||||
Not implemented yet. """
|
||||
aui.AUI_NB_BOTTOM
|
||||
""" With this style, tabs are drawn along the bottom of the notebook. """
|
||||
aui.AUI_NB_TAB_SPLIT
|
||||
""" Allows the tab control to be split by dragging a tab. """
|
||||
aui.AUI_NB_TAB_MOVE
|
||||
""" Allows a tab to be moved horizontally by dragging. """
|
||||
aui.AUI_NB_TAB_EXTERNAL_MOVE
|
||||
""" Allows a tab to be moved to another tab control. """
|
||||
aui.AUI_NB_TAB_FIXED_WIDTH
|
||||
""" With this style, all tabs have the same width. """
|
||||
aui.AUI_NB_SCROLL_BUTTONS
|
||||
""" With this style, left and right scroll buttons are displayed. """
|
||||
aui.AUI_NB_WINDOWLIST_BUTTON
|
||||
""" With this style, a drop-down list of windows is available. """
|
||||
aui.AUI_NB_CLOSE_BUTTON
|
||||
""" With this style, a close button is available on the tab bar. """
|
||||
aui.AUI_NB_CLOSE_ON_ACTIVE_TAB
|
||||
""" With this style, a close button is available on the active tab. """
|
||||
aui.AUI_NB_CLOSE_ON_ALL_TABS
|
||||
""" With this style, a close button is available on all tabs. """
|
||||
aui.AUI_NB_MIDDLE_CLICK_CLOSE
|
||||
""" Allows to close `AuiNotebook` tabs by mouse middle button click. """
|
||||
aui.AUI_NB_SUB_NOTEBOOK
|
||||
""" This style is used by `AuiManager` to create automatic `AuiNotebooks`. """
|
||||
aui.AUI_NB_HIDE_ON_SINGLE_TAB
|
||||
""" Hides the tab window if only one tab is present. """
|
||||
aui.AUI_NB_SMART_TABS
|
||||
""" Use `Smart Tabbing`, like ``Alt`` + ``Tab`` on Windows. """
|
||||
aui.AUI_NB_USE_IMAGES_DROPDOWN
|
||||
""" Uses images on dropdown window list menu instead of check items. """
|
||||
aui.AUI_NB_CLOSE_ON_TAB_LEFT
|
||||
""" Draws the tab close button on the left instead of on the right
|
||||
(a la Camino browser). """
|
||||
aui.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. """
|
||||
aui.AUI_NB_DRAW_DND_TAB
|
||||
""" Draws an image representation of a tab while dragging. """
|
||||
aui.AUI_NB_ORDER_BY_ACCESS
|
||||
""" Tab navigation order by last access time. """
|
||||
aui.AUI_NB_NO_TAB_FOCUS
|
||||
""" Don't draw tab focus rectangle. """
|
||||
|
||||
aui.AUI_NB_DEFAULT_STYLE
|
||||
""" Default `AuiNotebook` style. """
|
||||
|
||||
# -------------------------- #
|
||||
# - FrameManager Constants - #
|
||||
# -------------------------- #
|
||||
|
||||
# Docking Styles
|
||||
aui.AUI_DOCK_NONE
|
||||
""" No docking direction. """
|
||||
aui.AUI_DOCK_TOP
|
||||
""" Top docking direction. """
|
||||
aui.AUI_DOCK_RIGHT
|
||||
""" Right docking direction. """
|
||||
aui.AUI_DOCK_BOTTOM
|
||||
""" Bottom docking direction. """
|
||||
aui.AUI_DOCK_LEFT
|
||||
""" Left docking direction. """
|
||||
aui.AUI_DOCK_CENTER
|
||||
""" Center docking direction. """
|
||||
aui.AUI_DOCK_CENTRE
|
||||
""" Centre docking direction. """
|
||||
aui.AUI_DOCK_NOTEBOOK_PAGE
|
||||
""" Automatic AuiNotebooks docking style. """
|
||||
|
||||
# Floating/Dragging Styles
|
||||
aui.AUI_MGR_ALLOW_FLOATING
|
||||
""" Allow floating of panes. """
|
||||
aui.AUI_MGR_ALLOW_ACTIVE_PANE
|
||||
""" If a pane becomes active, "highlight" it in the interface. """
|
||||
aui.AUI_MGR_TRANSPARENT_DRAG
|
||||
""" If the platform supports it, set transparency on a floating pane
|
||||
while it is dragged by the user. """
|
||||
aui.AUI_MGR_TRANSPARENT_HINT
|
||||
""" If the platform supports it, show a transparent hint window when
|
||||
the user is about to dock a floating pane. """
|
||||
aui.AUI_MGR_VENETIAN_BLINDS_HINT
|
||||
""" Show a "venetian blind" effect when the user is about to dock a
|
||||
floating pane. """
|
||||
aui.AUI_MGR_RECTANGLE_HINT
|
||||
""" Show a rectangle hint effect when the user is about to dock a
|
||||
floating pane. """
|
||||
aui.AUI_MGR_HINT_FADE
|
||||
""" If the platform supports it, the hint window will fade in and out. """
|
||||
aui.AUI_MGR_NO_VENETIAN_BLINDS_FADE
|
||||
""" Disables the "venetian blind" fade in and out. """
|
||||
aui.AUI_MGR_LIVE_RESIZE
|
||||
""" Live resize when the user drag a sash. """
|
||||
aui.AUI_MGR_ANIMATE_FRAMES
|
||||
""" Fade-out floating panes when they are closed (all platforms which support
|
||||
frames transparency) and show a moving rectangle when they are docked
|
||||
(Windows < Vista and GTK only). """
|
||||
aui.AUI_MGR_AERO_DOCKING_GUIDES
|
||||
""" Use the new Aero-style bitmaps as docking guides. """
|
||||
aui.AUI_MGR_PREVIEW_MINIMIZED_PANES
|
||||
""" Slide in and out minimized panes to preview them. """
|
||||
aui.AUI_MGR_WHIDBEY_DOCKING_GUIDES
|
||||
""" Use the new Whidbey-style bitmaps as docking guides. """
|
||||
aui.AUI_MGR_SMOOTH_DOCKING
|
||||
""" Performs a "smooth" docking of panes (a la PyQT). """
|
||||
aui.AUI_MGR_USE_NATIVE_MINIFRAMES
|
||||
""" Use miniframes with native caption bar as floating panes instead or custom
|
||||
drawn caption bars (forced on wxMac). """
|
||||
aui.AUI_MGR_AUTONB_NO_CAPTION
|
||||
""" Panes that merge into an automatic notebook will not have the pane
|
||||
caption visible. """
|
||||
|
||||
|
||||
aui.AUI_MGR_DEFAULT
|
||||
""" Default `AuiManager` style. """
|
||||
|
||||
# Panes Customization
|
||||
aui.AUI_DOCKART_SASH_SIZE
|
||||
""" Customizes the sash size. """
|
||||
aui.AUI_DOCKART_CAPTION_SIZE
|
||||
""" Customizes the caption size. """
|
||||
aui.AUI_DOCKART_GRIPPER_SIZE
|
||||
""" Customizes the gripper size. """
|
||||
aui.AUI_DOCKART_PANE_BORDER_SIZE
|
||||
""" Customizes the pane border size. """
|
||||
aui.AUI_DOCKART_PANE_BUTTON_SIZE
|
||||
""" Customizes the pane button size. """
|
||||
aui.AUI_DOCKART_BACKGROUND_COLOUR
|
||||
""" Customizes the background colour. """
|
||||
aui.AUI_DOCKART_BACKGROUND_GRADIENT_COLOUR
|
||||
""" Customizes the background gradient colour. """
|
||||
aui.AUI_DOCKART_SASH_COLOUR
|
||||
""" Customizes the sash colour. """
|
||||
aui.AUI_DOCKART_ACTIVE_CAPTION_COLOUR
|
||||
""" Customizes the active caption colour. """
|
||||
aui.AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR
|
||||
""" Customizes the active caption gradient colour. """
|
||||
aui.AUI_DOCKART_INACTIVE_CAPTION_COLOUR
|
||||
""" Customizes the inactive caption colour. """
|
||||
aui.AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR
|
||||
""" Customizes the inactive gradient caption colour. """
|
||||
aui.AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR
|
||||
""" Customizes the active caption text colour. """
|
||||
aui.AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR
|
||||
""" Customizes the inactive caption text colour. """
|
||||
aui.AUI_DOCKART_BORDER_COLOUR
|
||||
""" Customizes the border colour. """
|
||||
aui.AUI_DOCKART_GRIPPER_COLOUR
|
||||
""" Customizes the gripper colour. """
|
||||
aui.AUI_DOCKART_CAPTION_FONT
|
||||
""" Customizes the caption font. """
|
||||
aui.AUI_DOCKART_GRADIENT_TYPE
|
||||
""" Customizes the gradient type (no gradient, vertical or horizontal). """
|
||||
aui.AUI_DOCKART_DRAW_SASH_GRIP
|
||||
""" Draw a sash grip on the sash. """
|
||||
aui.AUI_DOCKART_HINT_WINDOW_COLOUR
|
||||
""" Customizes the hint window background colour (currently light blue). """
|
||||
|
||||
# Caption Gradient Type
|
||||
aui.AUI_GRADIENT_NONE
|
||||
""" No gradient on the captions. """
|
||||
aui.AUI_GRADIENT_VERTICAL
|
||||
|
||||
""" Vertical gradient on the captions. """
|
||||
aui.AUI_GRADIENT_HORIZONTAL
|
||||
""" Horizontal gradient on the captions. """
|
||||
|
||||
# Pane Button State
|
||||
aui.AUI_BUTTON_STATE_NORMAL
|
||||
""" Normal button state. """
|
||||
aui.AUI_BUTTON_STATE_HOVER
|
||||
""" Hovered button state. """
|
||||
aui.AUI_BUTTON_STATE_PRESSED
|
||||
""" Pressed button state. """
|
||||
aui.AUI_BUTTON_STATE_DISABLED
|
||||
""" Disabled button state. """
|
||||
aui.AUI_BUTTON_STATE_HIDDEN
|
||||
""" Hidden button state. """
|
||||
aui.AUI_BUTTON_STATE_CHECKED
|
||||
""" Checked button state. """
|
||||
|
||||
# Pane minimize mode
|
||||
aui.AUI_MINIMIZE_POS_SMART
|
||||
""" Minimizes the pane on the closest tool bar. """
|
||||
aui.AUI_MINIMIZE_POS_TOP
|
||||
""" Minimizes the pane on the top tool bar. """
|
||||
aui.AUI_MINIMIZE_POS_LEFT
|
||||
""" Minimizes the pane on its left tool bar. """
|
||||
aui.AUI_MINIMIZE_POS_RIGHT
|
||||
""" Minimizes the pane on its right tool bar. """
|
||||
aui.AUI_MINIMIZE_POS_BOTTOM
|
||||
""" Minimizes the pane on its bottom tool bar. """
|
||||
aui.AUI_MINIMIZE_POS_TOOLBAR
|
||||
""" Minimizes the pane on its bottom tool bar. """
|
||||
aui.AUI_MINIMIZE_POS_MASK
|
||||
""" Mask to filter the position flags. """
|
||||
aui.AUI_MINIMIZE_CAPT_HIDE
|
||||
""" Hides the caption of the minimized pane. """
|
||||
aui.AUI_MINIMIZE_CAPT_SMART
|
||||
""" Displays the caption in the best rotation (horz or clockwise). """
|
||||
aui.AUI_MINIMIZE_CAPT_HORZ
|
||||
""" Displays the caption horizontally. """
|
||||
aui.AUI_MINIMIZE_CAPT_MASK
|
||||
""" Mask to filter the caption flags. """
|
||||
|
||||
# Button kind
|
||||
aui.AUI_BUTTON_CLOSE
|
||||
""" Shows a close button on the pane. """
|
||||
aui.AUI_BUTTON_MAXIMIZE_RESTORE
|
||||
""" Shows a maximize/restore button on the pane. """
|
||||
aui.AUI_BUTTON_MINIMIZE
|
||||
""" Shows a minimize button on the pane. """
|
||||
aui.AUI_BUTTON_PIN
|
||||
""" Shows a pin button on the pane. """
|
||||
aui.AUI_BUTTON_OPTIONS
|
||||
""" Shows an option button on the pane (not implemented). """
|
||||
aui.AUI_BUTTON_WINDOWLIST
|
||||
""" Shows a window list button on the pane (for AuiNotebook). """
|
||||
aui.AUI_BUTTON_LEFT
|
||||
""" Shows a left button on the pane (for AuiNotebook). """
|
||||
aui.AUI_BUTTON_RIGHT
|
||||
""" Shows a right button on the pane (for AuiNotebook). """
|
||||
aui.AUI_BUTTON_UP
|
||||
""" Shows an up button on the pane (not implemented). """
|
||||
aui.AUI_BUTTON_DOWN
|
||||
""" Shows a down button on the pane (not implemented). """
|
||||
aui.AUI_BUTTON_CUSTOM1
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM2
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM3
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM4
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM5
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM6
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM7
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM8
|
||||
""" Shows a custom button on the pane. """
|
||||
aui.AUI_BUTTON_CUSTOM9
|
||||
""" Shows a custom button on the pane. """
|
||||
|
||||
# Pane Insert Level
|
||||
aui.AUI_INSERT_PANE
|
||||
""" Level for inserting a pane. """
|
||||
aui.AUI_INSERT_ROW
|
||||
""" Level for inserting a row. """
|
||||
aui.AUI_INSERT_DOCK
|
||||
""" Level for inserting a dock. """
|
||||
|
||||
# ------------------------ #
|
||||
# - AuiToolBar Constants - #
|
||||
# ------------------------ #
|
||||
|
||||
aui.ITEM_CONTROL
|
||||
""" The item in the AuiToolBar is a control. """
|
||||
aui.ITEM_LABEL
|
||||
""" The item in the AuiToolBar is a text label. """
|
||||
aui.ITEM_SPACER
|
||||
""" The item in the AuiToolBar is a spacer. """
|
||||
aui.ITEM_SEPARATOR
|
||||
""" The item in the AuiToolBar is a separator. """
|
||||
aui.ITEM_CHECK
|
||||
""" The item in the AuiToolBar is a toolbar check item. """
|
||||
aui.ITEM_NORMAL
|
||||
""" The item in the AuiToolBar is a standard toolbar item. """
|
||||
aui.ITEM_RADIO
|
||||
""" The item in the AuiToolBar is a toolbar radio item. """
|
||||
aui.ID_RESTORE_FRAME
|
||||
""" Identifier for restoring a minimized pane. """
|
||||
|
||||
aui.BUTTON_DROPDOWN_WIDTH
|
||||
""" Width of the drop-down button in AuiToolBar. """
|
||||
|
||||
aui.DISABLED_TEXT_GREY_HUE
|
||||
""" Hue text colour for the disabled text in AuiToolBar. """
|
||||
aui.DISABLED_TEXT_COLOUR
|
||||
""" Text colour for the disabled text in AuiToolBar. """
|
||||
|
||||
aui.AUI_TB_TEXT
|
||||
""" Shows the text in the toolbar buttons; by default only icons are shown. """
|
||||
aui.AUI_TB_NO_TOOLTIPS
|
||||
""" Don't show tooltips on `AuiToolBar` items. """
|
||||
aui.AUI_TB_NO_AUTORESIZE
|
||||
""" Do not auto-resize the `AuiToolBar`. """
|
||||
aui.AUI_TB_GRIPPER
|
||||
""" Shows a gripper on the `AuiToolBar`. """
|
||||
aui.AUI_TB_OVERFLOW
|
||||
""" The `AuiToolBar` can contain overflow items. """
|
||||
aui.AUI_TB_VERTICAL
|
||||
""" The `AuiToolBar` is vertical. """
|
||||
aui.AUI_TB_HORZ_LAYOUT
|
||||
""" Shows the text and the icons alongside, not vertically stacked.
|
||||
This style must be used with ``AUI_TB_TEXT``. """
|
||||
aui.AUI_TB_PLAIN_BACKGROUND
|
||||
""" Don't draw a gradient background on the toolbar. """
|
||||
aui.AUI_TB_CLOCKWISE
|
||||
aui.AUI_TB_COUNTERCLOCKWISE
|
||||
|
||||
aui.AUI_TB_HORZ_TEXT
|
||||
""" Combination of ``AUI_TB_HORZ_LAYOUT`` and ``AUI_TB_TEXT``. """
|
||||
aui.AUI_TB_VERT_TEXT
|
||||
|
||||
aui.AUI_TB_DEFAULT_STYLE
|
||||
""" `AuiToolBar` default style. """
|
||||
|
||||
# AuiToolBar settings
|
||||
aui.AUI_TBART_SEPARATOR_SIZE
|
||||
""" Separator size in AuiToolBar. """
|
||||
aui.AUI_TBART_GRIPPER_SIZE
|
||||
""" Gripper size in AuiToolBar. """
|
||||
aui.AUI_TBART_OVERFLOW_SIZE
|
||||
""" Overflow button size in AuiToolBar. """
|
||||
|
||||
# AuiToolBar text orientation
|
||||
aui.AUI_TBTOOL_TEXT_LEFT
|
||||
""" Text in AuiToolBar items is aligned left. """
|
||||
aui.AUI_TBTOOL_TEXT_RIGHT
|
||||
""" Text in AuiToolBar items is aligned right. """
|
||||
aui.AUI_TBTOOL_TEXT_TOP
|
||||
""" Text in AuiToolBar items is aligned top. """
|
||||
aui.AUI_TBTOOL_TEXT_BOTTOM
|
||||
""" Text in AuiToolBar items is aligned bottom. """
|
||||
|
||||
# AuiToolBar tool orientation
|
||||
aui.AUI_TBTOOL_HORIZONTAL
|
||||
aui.AUI_TBTOOL_VERT_CLOCKWISE
|
||||
aui.AUI_TBTOOL_VERT_COUNTERCLOCKWISE
|
||||
|
||||
# ------------------------------- #
|
||||
# - AuiSwitcherDialog Constants - #
|
||||
# ------------------------------- #
|
||||
|
||||
aui.SWITCHER_TEXT_MARGIN_X
|
||||
aui.SWITCHER_TEXT_MARGIN_Y
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
18
unittests/test_lib_agw_aui_dockart.py
Normal file
18
unittests/test_lib_agw_aui_dockart.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import os
|
||||
|
||||
import wx.lib.agw.aui.dockart as da
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_agw_aui_dockart_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_agw_aui_dockartCtor(self):
|
||||
da.ModernDockArt(self.frame)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
24
unittests/test_lib_agw_aui_tabart.py
Normal file
24
unittests/test_lib_agw_aui_tabart.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import os
|
||||
|
||||
import wx.lib.agw.aui.tabart as ta
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_agw_aui_tabart_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_agw_aui_tabartCtor(self):
|
||||
ta.AuiCommandCapture()
|
||||
ta.AuiDefaultTabArt()
|
||||
ta.AuiSimpleTabArt()
|
||||
ta.ChromeTabArt()
|
||||
ta.FF2TabArt()
|
||||
ta.VC71TabArt()
|
||||
ta.VC8TabArt()
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
32
unittests/test_lib_agw_aui_utilities.py
Normal file
32
unittests/test_lib_agw_aui_utilities.py
Normal file
@@ -0,0 +1,32 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import os
|
||||
|
||||
import wx.lib.agw.aui.aui_utilities as auiu
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_agw_aui_utilities_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_agw_aui_utilititiesCtor(self):
|
||||
auiu.StepColour(auiu.GetBaseColour(), 60)
|
||||
|
||||
auiu.LightContrastColour(wx.RED)
|
||||
|
||||
auiu.LightColour(wx.RED, 50)
|
||||
|
||||
dc = wx.GCDC()
|
||||
auiu.ChopText(dc, "a little test text", 10)
|
||||
|
||||
button_dropdown_bits = b"\xe0\xf1\xfb"
|
||||
bmp = auiu.BitmapFromBits(button_dropdown_bits, 5, 3, wx.BLACK)
|
||||
|
||||
auiu.MakeDisabledBitmap(bmp)
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -14,7 +14,7 @@ class lib_agw_persist_persistencemanager_Tests(wtc.WidgetTestCase):
|
||||
|
||||
self._persistMgr = PM.PersistenceManager.Get()
|
||||
|
||||
dirName = os.path.abspath(__file__)
|
||||
dirName, fileName = os.path.split(os.path.abspath(__file__))
|
||||
_configFile1 = os.path.join(dirName, "PersistTest1")
|
||||
self._persistMgr.SetPersistenceFile(_configFile1)
|
||||
|
||||
@@ -23,13 +23,271 @@ class lib_agw_persist_persistencemanager_Tests(wtc.WidgetTestCase):
|
||||
|
||||
self._persistMgr.RegisterAndRestoreAll(self.frame)
|
||||
|
||||
self._persistMgr.SaveAndUnregister()
|
||||
|
||||
|
||||
def test_lib_agw_persist_persistencemanagerRestore(self):
|
||||
|
||||
self._persistMgr = PM.PersistenceManager.Get()
|
||||
|
||||
dirName, fileName = os.path.split(os.path.abspath(__file__))
|
||||
_configFile1 = os.path.join(dirName, "PersistTest1")
|
||||
self._persistMgr.SetPersistenceFile(_configFile1)
|
||||
|
||||
# give the frame a Name for below
|
||||
self.frame.SetName('PersistTestFrame')
|
||||
|
||||
self._persistMgr.RegisterAndRestoreAll(self.frame)
|
||||
|
||||
self.assertEqual(self._persistMgr.HasRestored(), True, "Persistence should be there, as it was created in CTOR test.")
|
||||
|
||||
def test_lib_agw_persist_persistencemanagerConstantsExist(self):
|
||||
# PersistenceManager styles
|
||||
PM.PM_SAVE_RESTORE_AUI_PERSPECTIVES
|
||||
PM.PM_SAVE_RESTORE_TREE_LIST_SELECTIONS
|
||||
PM.PM_PERSIST_CONTROL_VALUE
|
||||
PM.PM_RESTORE_CAPTION_FROM_CODE
|
||||
PM.PM_DEFAULT_STYLE
|
||||
|
||||
|
||||
# String constants used by BookHandler
|
||||
|
||||
PM.PERSIST_BOOK_KIND
|
||||
PM.PERSIST_BOOK_SELECTION
|
||||
|
||||
# To save and restore wx.lib.agw.aui.AuiNotebook perspectives
|
||||
PM.PERSIST_BOOK_AGW_AUI_PERSPECTIVE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by TreebookHandler
|
||||
|
||||
PM.PERSIST_TREEBOOK_KIND
|
||||
|
||||
# this key contains the indices of all expanded nodes in the tree book
|
||||
# separated by PERSIST_SEP
|
||||
PM.PERSIST_TREEBOOK_EXPANDED_BRANCHES
|
||||
PM.PERSIST_SEP
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by TLWHandler
|
||||
|
||||
# we use just "Window" to keep configuration files and such short, there
|
||||
# should be no confusion with wx.Window itself as we don't have persistent
|
||||
# windows, just persistent controls which have their own specific kind strings
|
||||
|
||||
PM.PERSIST_TLW_KIND
|
||||
|
||||
# Names for various persistent options
|
||||
PM.PERSIST_TLW_X
|
||||
PM.PERSIST_TLW_Y
|
||||
PM.PERSIST_TLW_W
|
||||
PM.PERSIST_TLW_H
|
||||
|
||||
PM.PERSIST_TLW_MAXIMIZED
|
||||
PM.PERSIST_TLW_ICONIZED
|
||||
|
||||
# To save and restore wx.aui and wx.lib.agw.aui perspectives
|
||||
PM.PERSIST_AGW_AUI_PERSPECTIVE
|
||||
PM.PERSIST_AUI_PERSPECTIVE
|
||||
|
||||
PM.PERSIST_AUIPERSPECTIVE_KIND
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by CheckBoxHandler
|
||||
|
||||
PM.PERSIST_CHECKBOX_KIND
|
||||
PM.PERSIST_CHECKBOX_3STATE
|
||||
PM.PERSIST_CHECKBOX
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ListBoxHandler
|
||||
|
||||
PM.PERSIST_LISTBOX_KIND
|
||||
PM.PERSIST_LISTBOX_SELECTIONS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ListCtrlHandler
|
||||
|
||||
PM.PERSIST_LISTCTRL_KIND
|
||||
PM.PERSIST_LISTCTRL_COLWIDTHS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by CheckListBoxHandler
|
||||
|
||||
PM.PERSIST_CHECKLISTBOX_KIND
|
||||
PM.PERSIST_CHECKLIST_CHECKED
|
||||
PM.PERSIST_CHECKLIST_SELECTIONS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ChoiceComboHandler
|
||||
|
||||
PM.PERSIST_CHOICECOMBO_KIND
|
||||
PM.PERSIST_CHOICECOMBO_SELECTION
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by RadioBoxHandler
|
||||
|
||||
PM.PERSIST_RADIOBOX_KIND
|
||||
PM.PERSIST_RADIOBOX_SELECTION
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by RadioButtonHandler
|
||||
|
||||
PM.PERSIST_RADIOBUTTON_KIND
|
||||
PM.PERSIST_RADIOBUTTON_VALUE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ScrolledWindowHandler
|
||||
|
||||
PM.PERSIST_SCROLLEDWINDOW_KIND
|
||||
PM.PERSIST_SCROLLEDWINDOW_POS_H
|
||||
PM.PERSIST_SCROLLEDWINDOW_POS_V
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by SliderHandler
|
||||
|
||||
PM.PERSIST_SLIDER_KIND
|
||||
PM.PERSIST_SLIDER_VALUE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by SpinHandler
|
||||
|
||||
PM.PERSIST_SPIN_KIND
|
||||
PM.PERSIST_SPIN_VALUE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by SplitterHandler
|
||||
|
||||
PM.PERSIST_SPLITTER_KIND
|
||||
PM.PERSIST_SPLITTER_POSITION
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by TextCtrlHandler
|
||||
|
||||
PM.PERSIST_TEXTCTRL_KIND
|
||||
PM.PERSIST_TEXTCTRL_VALUE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ToggleButtonHandler
|
||||
|
||||
PM.PERSIST_TOGGLEBUTTON_KIND
|
||||
PM.PERSIST_TOGGLEBUTTON_TOGGLED
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by TreeCtrlHandler
|
||||
|
||||
PM.PERSIST_TREECTRL_KIND
|
||||
PM.PERSIST_TREECTRL_CHECKED_ITEMS
|
||||
PM.PERSIST_TREECTRL_EXPANSION
|
||||
PM.PERSIST_TREECTRL_SELECTIONS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by TreeListCtrlHandler
|
||||
|
||||
PM.PERSIST_TREELISTCTRL_KIND
|
||||
PM.PERSIST_TREELISTCTRL_COLWIDTHS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by CalendarCtrlHandler
|
||||
|
||||
PM.PERSIST_CALENDAR_KIND
|
||||
PM.PERSIST_CALENDAR_DATE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by CollapsiblePaneHandler
|
||||
|
||||
PM.PERSIST_COLLAPSIBLE_KIND
|
||||
PM.PERSIST_COLLAPSIBLE_STATE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by DatePickerHandler
|
||||
|
||||
PM.PERSIST_DATEPICKER_KIND
|
||||
PM.PERSIST_DATEPICKER_DATE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by MediaCtrlHandler
|
||||
|
||||
PM.PERSIST_MEDIA_KIND
|
||||
|
||||
PM.PERSIST_MEDIA_POS
|
||||
PM.PERSIST_MEDIA_VOLUME
|
||||
PM.PERSIST_MEDIA_RATE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ColourPickerHandler
|
||||
|
||||
PM.PERSIST_COLOURPICKER_KIND
|
||||
PM.PERSIST_COLOURPICKER_COLOUR
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by FileDirPickerHandler
|
||||
|
||||
PM.PERSIST_FILEDIRPICKER_KIND
|
||||
PM.PERSIST_FILEDIRPICKER_PATH
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by FontPickerHandler
|
||||
|
||||
PM.PERSIST_FONTPICKER_KIND
|
||||
PM.PERSIST_FONTPICKER_FONT
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by FileHistoryHandler
|
||||
|
||||
PM.PERSIST_FILEHISTORY_KIND
|
||||
PM.PERSIST_FILEHISTORY_PATHS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by FindReplaceHandler
|
||||
|
||||
PM.PERSIST_FINDREPLACE_KIND
|
||||
PM.PERSIST_FINDREPLACE_FLAGS
|
||||
PM.PERSIST_FINDREPLACE_SEARCH
|
||||
PM.PERSIST_FINDREPLACE_REPLACE
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by FontDialogHandler
|
||||
|
||||
PM.PERSIST_FONTDIALOG_KIND
|
||||
PM.PERSIST_FONTDIALOG_EFFECTS
|
||||
PM.PERSIST_FONTDIALOG_SYMBOLS
|
||||
PM.PERSIST_FONTDIALOG_COLOUR
|
||||
PM.PERSIST_FONTDIALOG_FONT
|
||||
PM.PERSIST_FONTDIALOG_HELP
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ColourDialogHandler
|
||||
|
||||
PM.PERSIST_COLOURDIALOG_KIND
|
||||
PM.PERSIST_COLOURDIALOG_COLOUR
|
||||
PM.PERSIST_COLOURDIALOG_CHOOSEFULL
|
||||
PM.PERSIST_COLOURDIALOG_CUSTOMCOLOURS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ChoiceDialogHandler
|
||||
|
||||
PM.PERSIST_CHOICEDIALOG_KIND
|
||||
PM.PERSIST_CHOICEDIALOG_SELECTIONS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by MenuBarHandler
|
||||
|
||||
PM.PERSIST_MENUBAR_KIND
|
||||
PM.PERSIST_MENUBAR_CHECKRADIO_ITEMS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by ToolBarHandler
|
||||
|
||||
PM.PERSIST_TOOLBAR_KIND
|
||||
PM.PERSIST_TOOLBAR_CHECKRADIO_ITEMS
|
||||
|
||||
# ----------------------------------------------------------------------------------- #
|
||||
# String constants used by FoldPanelBarHandler
|
||||
|
||||
PM.PERSIST_FOLDPANELBAR_KIND
|
||||
PM.PERSIST_FOLDPANELBAR_EXPANDED
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -51,6 +51,58 @@ class lib_agw_ribbon_Tests(wtc.WidgetTestCase):
|
||||
toolbar.AddSeparator()
|
||||
toolbar.AddDropdownTool(wx.ID_UNDO, wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_OTHER, wx.Size(16, 15)))
|
||||
|
||||
def test_lib_agw_ribbonControlCtor(self):
|
||||
rib = RB.RibbonBar(self.frame, wx.ID_ANY, agwStyle=RB.RIBBON_BAR_DEFAULT_STYLE|RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS)
|
||||
RB.RibbonControl(rib)
|
||||
|
||||
def test_lib_agw_ribbonGalleryCtor(self):
|
||||
rib = RB.RibbonBar(self.frame, wx.ID_ANY, agwStyle=RB.RIBBON_BAR_DEFAULT_STYLE|RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS)
|
||||
page = RB.RibbonPage(rib, wx.ID_ANY, "Appearance")
|
||||
primary_panel = RB.RibbonPanel(page, wx.ID_ANY, "Primary Colour")
|
||||
RB.RibbonGallery(primary_panel)
|
||||
|
||||
def test_lib_agw_ribbonPageCtor(self):
|
||||
rib = RB.RibbonBar(self.frame, wx.ID_ANY, agwStyle=RB.RIBBON_BAR_DEFAULT_STYLE|RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS)
|
||||
RB.RibbonPage(rib)
|
||||
|
||||
def test_lib_agw_ribbonPanelCtor(self):
|
||||
rib = RB.RibbonBar(self.frame, wx.ID_ANY, agwStyle=RB.RIBBON_BAR_DEFAULT_STYLE|RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS)
|
||||
page = RB.RibbonPage(rib, wx.ID_ANY, "Appearance")
|
||||
RB.RibbonPanel(page)
|
||||
|
||||
def test_lib_agw_ribbonArtProviders(self):
|
||||
rib = RB.RibbonBar(self.frame, wx.ID_ANY, agwStyle=RB.RIBBON_BAR_DEFAULT_STYLE|RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS)
|
||||
rib.SetArtProvider(RB.RibbonDefaultArtProvider())
|
||||
rib.SetArtProvider(RB.RibbonAUIArtProvider())
|
||||
rib.SetArtProvider(RB.RibbonMSWArtProvider())
|
||||
rib.SetArtProvider(RB.RibbonOSXArtProvider())
|
||||
|
||||
def test_lib_agw_ribbonEvents(self):
|
||||
RB.EVT_RIBBONBAR_PAGE_CHANGED
|
||||
RB.EVT_RIBBONBAR_PAGE_CHANGING
|
||||
RB.EVT_RIBBONBAR_TAB_LEFT_DCLICK
|
||||
RB.EVT_RIBBONBAR_TAB_MIDDLE_DOWN
|
||||
RB.EVT_RIBBONBAR_TAB_MIDDLE_UP
|
||||
RB.EVT_RIBBONBAR_TAB_RIGHT_DOWN
|
||||
RB.EVT_RIBBONBAR_TAB_RIGHT_UP
|
||||
RB.EVT_RIBBONBUTTONBAR_CLICKED
|
||||
RB.EVT_RIBBONGALLERY_HOVER_CHANGED
|
||||
RB.EVT_RIBBONGALLERY_SELECTED
|
||||
RB.EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED
|
||||
RB.EVT_RIBBONTOOLBAR_CLICKED
|
||||
RB.EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED
|
||||
|
||||
def test_lib_agw_ribbonStyles(self):
|
||||
RB.RIBBON_BAR_DEFAULT_STYLE
|
||||
RB.RIBBON_BAR_FOLDBAR_STYLE
|
||||
RB.RIBBON_BAR_SHOW_PAGE_LABELS
|
||||
RB.RIBBON_BAR_SHOW_PAGE_ICONS
|
||||
RB.RIBBON_BAR_FLOW_HORIZONTAL
|
||||
RB.RIBBON_BAR_FLOW_VERTICAL
|
||||
RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS
|
||||
RB.RIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS
|
||||
RB.RIBBON_BAR_ALWAYS_SHOW_TABS
|
||||
|
||||
def test_lib_agw_pyprogressConstantsExists(self):
|
||||
RB.RIBBON_ART_TAB_SEPARATION_SIZE
|
||||
RB.RIBBON_ART_PAGE_BORDER_LEFT_SIZE
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: aui_constants.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
This module contains all the constants used by wxPython-AUI.
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: aui_switcherdialog.py
|
||||
# Purpose:
|
||||
@@ -8,7 +9,7 @@
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port
|
||||
# Tags: phoenix-port, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
Description
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: aui_utilities.py
|
||||
# Purpose:
|
||||
@@ -8,7 +9,7 @@
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
This module contains some common functions used by :mod:`lib.agw.aui` to
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: auibar.py
|
||||
# Purpose:
|
||||
@@ -8,7 +9,7 @@
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`auibar.py` contains an implementation of :class:`AuiToolBar`, which is a completely owner-drawn
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: auibook.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`auibook.py` contains a notebook control which implements many features common in
|
||||
applications with dockable panes. Specifically, :class:`AuiNotebook` implements functionality
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: dockart.py
|
||||
# Purpose:
|
||||
@@ -8,7 +9,7 @@
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
Dock art provider code - a dock provider provides all drawing functionality to
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------------------------- #
|
||||
# AUI Library wxPython IMPLEMENTATION
|
||||
#
|
||||
@@ -23,6 +24,8 @@
|
||||
#
|
||||
# Or, Obviously, To The wxPython Mailing List!!!
|
||||
#
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#
|
||||
# End Of Comments
|
||||
# --------------------------------------------------------------------------- #
|
||||
|
||||
@@ -4750,8 +4753,8 @@ class AuiManager(wx.EvtHandler):
|
||||
|
||||
# if the pane's name identifier is blank, create a random string
|
||||
if pinfo.name == "" or already_exists:
|
||||
pinfo.name = ("%s%08x%08x%08x")%(pinfo.window.GetName(), time.time(),
|
||||
time.clock(), len(self._panes))
|
||||
pinfo.name = ("%s%08x%08x%08x") % (pinfo.window.GetName(), int(time.time()),
|
||||
int(time.clock()), len(self._panes))
|
||||
|
||||
# set initial proportion (if not already set)
|
||||
if pinfo.dock_proportion == 0:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: tabart.py
|
||||
# Purpose:
|
||||
@@ -8,7 +9,7 @@
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
Tab art provider code - a tab provider provides all drawing functionality to
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: auimdi.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date: 31 March 2009
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, documented
|
||||
#----------------------------------------------------------------------------
|
||||
__author__ = "Andrea Gavana <andrea.gavana@gmail.com>"
|
||||
__date__ = "31 March 2009"
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------------------------- #
|
||||
#
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#
|
||||
# End Of Comments
|
||||
# --------------------------------------------------------------------------- #
|
||||
|
||||
"""
|
||||
This module contains all the constants used by the persistent objects.
|
||||
"""
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# -*- coding: utf-8 -*-#
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------------------------- #
|
||||
#
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#
|
||||
# End Of Comments
|
||||
# --------------------------------------------------------------------------- #
|
||||
"""
|
||||
This module contains different classes which handle different kind of saving/restoring
|
||||
actions depending on the widget kind.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-#
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------------------------- #
|
||||
# PersistentControls Library wxPython IMPLEMENTATION
|
||||
#
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: art.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
Contains the constants used by the ribbon package.
|
||||
"""
|
||||
# RibbonArtSetting
|
||||
RIBBON_ART_TAB_SEPARATION_SIZE = 1
|
||||
RIBBON_ART_PAGE_BORDER_LEFT_SIZE = 2
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: art_aui.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`art_aui` is responsible for drawing all the components of the ribbon
|
||||
interface using an AUI-compatible appearance.
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: art_default.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`art_default` is responsible for drawing all the components of the ribbon
|
||||
interface using a Windows/Mac or AUI appearance.
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: art_internal.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
This module contains methods used throughout the :class:`bar` library.
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: art_msw.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`art_msw` is responsible for drawing all the components of the ribbon
|
||||
interface using a Windows appearance.
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: art_msw.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`art_osx` is responsible for drawing all the components of the ribbon
|
||||
interface using an AUI-compatible appearance on Mac, because as of now there is no
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
# --------------------------------------------------------------------------- #
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: bar.py
|
||||
# Licence: wxWindows license
|
||||
#
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#
|
||||
# RIBBONBAR Library wxPython IMPLEMENTATION
|
||||
#
|
||||
# Original C++ Code From Peter Cawley.
|
||||
@@ -11,7 +17,7 @@
|
||||
# Andrea Gavana, @ 15 Oct 2009
|
||||
# Latest Revision: 27 Dec 2012, 21.00 GMT
|
||||
#
|
||||
# For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please
|
||||
# For All Kind Of Problems, Requests Or Enhancements And Bug Reports, Please
|
||||
# Write To Me At:
|
||||
#
|
||||
# andrea.gavana@gmail.com
|
||||
@@ -20,7 +26,7 @@
|
||||
# Or, Obviously, To The wxPython Mailing List!!!
|
||||
#
|
||||
# End Of Comments
|
||||
# --------------------------------------------------------------------------- #
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
"""
|
||||
Top-level control in a ribbon user interface.
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: buttonbar.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
A ribbon button bar is similar to a traditional toolbar.
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: control.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
`RibbonControl` serves as a base class for all controls which share the ribbon
|
||||
charactertics of having a ribbon art provider, and (optionally) non-continous
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: gallery.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
A ribbon gallery is like a :class:`ListBox`, but for bitmaps rather than strings.
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: page.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
Description
|
||||
===========
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: panel.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
Serves as a container for a group of (ribbon) controls.
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: toolbar.py
|
||||
# Purpose:
|
||||
#
|
||||
# Author: Andrea Gavana <andrea.gavana@gmail.com>
|
||||
#
|
||||
# Created:
|
||||
# Version:
|
||||
# Date:
|
||||
# Licence: wxWindows license
|
||||
# Tags: phoenix-port, unittest, documented, py3-port
|
||||
#----------------------------------------------------------------------------
|
||||
"""
|
||||
A ribbon tool bar is similar to a traditional toolbar which has no labels.
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ class NumCtrl(BaseMaskedTextCtrl, NumCtrlAccessorsMixin):
|
||||
'decimalChar': '.', # by default, use '.' for decimal point
|
||||
'allowNegative': True, # by default, allow negative numbers
|
||||
'useParensForNegatives': False, # by default, use '-' to indicate negatives
|
||||
'groupDigits': True, # by default, don't insert grouping
|
||||
'groupDigits': False, # by default, don't insert grouping
|
||||
'groupChar': ',', # by default, use ',' for grouping
|
||||
'min': None, # by default, no bounds set
|
||||
'max': None,
|
||||
|
||||
Reference in New Issue
Block a user