Home | Trees | Index | Help |
|
---|
Module FoldPanelBar :: Class FoldPanelBar |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |Panel
--+ | FoldPanelBar
Method Summary | |
---|---|
Default Class Constructor. | |
Adds a fold panel to the list of panels. | |
Adds a separator line to the current FoldPanel. | |
Adds a wxWindow derived class to the referenced FoldPanel. | |
Sets the style of the caption bar (called CaptionBar) of the FoldPanel. | |
Sets the style of all the caption bars of the FoldPanel. | |
Collapses the given FoldPanel reference, and updates the foldpanel bar. | |
Expands the given FoldPanel reference, and updates the foldpanel bar. | |
Returns the currently used caption style for the FoldPanel. | |
Returns the number of panels in the FoldPanelBar. | |
Returns the panel associated with the index "item". | |
Returns the length of the panels that are expanded and collapsed. | |
Returns wether the CaptionBar Has Default Orientation Or Not. | |
Handles the EVT_CAPTIONBAR event in the FoldPanelBar. | |
Handles the EVT_SIZE method for the FoldPanelBar. | |
Resizes the fold panels so they match the width. | |
Refreshes all the panels from given index down to last one. | |
Repositions all the collapsed panels to the bottom. | |
Inherited from Panel | |
| |
Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, String name=PanelNameStr) -> bool Create the GUI part of the Window for 2-phase creation mode. | |
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes (Static method) | |
InitDialog(self) | |
SetFocus(self) | |
SetFocusIgnoringChildren(self) | |
Inherited from Window | |
AcceptsFocus(self) -> bool | |
AcceptsFocusFromKeyboard(self) -> bool | |
AddChild(self, Window child) | |
AssociateHandle(self, long handle) | |
CaptureMouse(self) | |
Center(self, int direction=BOTH) | |
CenterOnParent(self, int dir=BOTH) | |
CenterOnScreen(self, int dir=BOTH) | |
Center(self, int direction=BOTH) | |
CenterOnParent(self, int dir=BOTH) | |
CenterOnScreen(self, int dir=BOTH) | |
ClearBackground(self) | |
ClientToScreen(self, Point pt) -> Point | |
ClientToScreenXY(int x, int y) -> (x,y) | |
Close(self, bool force=False) -> bool | |
ConvertDialogPointToPixels(self, Point pt) -> Point | |
ConvertDialogSizeToPixels(self, Size sz) -> Size | |
ConvertPixelPointToDialog(self, Point pt) -> Point | |
ConvertPixelSizeToDialog(self, Size sz) -> Size | |
Destroy(self) -> bool | |
DestroyChildren(self) -> bool | |
Disable(self) -> bool | |
DissociateHandle(self) | |
DLG_PNT(self, Point pt) -> Point | |
DLG_SZE(self, Size sz) -> Size | |
DragAcceptFiles(self, bool accept) | |
Enable(self, bool enable=True) -> bool | |
FindFocus() -> Window (Static method) | |
FindWindowById(self, long winid) -> Window | |
FindWindowByName(self, String name) -> Window | |
Fit(self) | |
FitInside(self) | |
Freeze(self) | |
GetAcceleratorTable(self) -> AcceleratorTable | |
GetAdjustedBestSize(self) -> Size | |
GetAutoLayout(self) -> bool | |
GetBackgroundColour(self) -> Colour | |
GetBackgroundStyle(self) -> int | |
GetBestFittingSize(self) -> Size | |
GetBestSize(self) -> Size | |
GetBestSizeTuple() -> (width, height) | |
GetBestVirtualSize(self) -> Size | |
GetBorder(self, long flags) -> int GetBorder(self) -> int | |
GetCapture() -> Window (Static method) | |
GetCaret(self) -> Caret | |
GetCharHeight(self) -> int | |
GetCharWidth(self) -> int | |
GetChildren(self) -> PyObject | |
GetClientAreaOrigin(self) -> Point | |
GetClientRect(self) -> Rect | |
GetClientSize(self) -> Size | |
GetClientSizeTuple() -> (width, height) | |
GetConstraints(self) -> LayoutConstraints | |
GetContainingSizer(self) -> Sizer | |
GetCursor(self) -> Cursor | |
GetDefaultAttributes(self) -> VisualAttributes | |
GetDefaultItem(self) -> Window | |
GetDropTarget(self) -> DropTarget | |
GetEventHandler(self) -> EvtHandler | |
GetExtraStyle(self) -> long | |
GetFont(self) -> Font | |
GetForegroundColour(self) -> Colour | |
GetFullTextExtent(String string, Font font=None) -> (width, height, descent, externalLeading) Get the width, height, decent and leading of the text using the current or specified font. | |
GetGrandParent(self) -> Window | |
GetHandle(self) -> long | |
GetHelpText(self) -> String | |
GetId(self) -> int | |
GetLabel(self) -> String | |
GetMaxHeight(self) -> int | |
GetMaxSize(self) -> Size | |
GetMaxWidth(self) -> int | |
GetMinHeight(self) -> int | |
GetMinSize(self) -> Size | |
GetMinWidth(self) -> int | |
GetName(self) -> String | |
GetParent(self) -> Window | |
GetPosition(self) -> Point | |
GetPositionTuple() -> (x,y) | |
GetRect(self) -> Rect | |
GetScrollPos(self, int orientation) -> int | |
GetScrollRange(self, int orientation) -> int | |
GetScrollThumb(self, int orientation) -> int | |
GetSize(self) -> Size | |
GetSizer(self) -> Sizer | |
GetSizeTuple() -> (width, height) | |
GetTextExtent(String string) -> (width, height) | |
GetThemeEnabled(self) -> bool | |
GetTitle(self) -> String | |
GetToolTip(self) -> ToolTip | |
GetUpdateClientRect(self) -> Rect | |
GetUpdateRegion(self) -> Region | |
GetValidator(self) -> Validator | |
GetVirtualSize(self) -> Size | |
GetVirtualSizeTuple() -> (width, height) | |
GetWindowStyleFlag(self) -> long | |
GetWindowStyleFlag(self) -> long | |
GetWindowVariant(self) -> int | |
HasCapture(self) -> bool | |
HasFlag(self, int flag) -> bool | |
HasScrollbar(self, int orient) -> bool | |
HasTransparentBackground(self) -> bool | |
Hide(self) -> bool | |
HitTest(self, Point pt) -> int | |
HitTestXY(self, int x, int y) -> int | |
InheritAttributes(self) | |
InheritsBackgroundColour(self) -> bool | |
InvalidateBestSize(self) | |
IsBeingDeleted(self) -> bool | |
IsEnabled(self) -> bool | |
IsExposed(self, int x, int y, int w=1, int h=1) -> bool | |
IsExposedPoint(self, Point pt) -> bool | |
IsExposedRect(self, Rect rect) -> bool | |
IsRetained(self) -> bool | |
IsShown(self) -> bool | |
IsTopLevel(self) -> bool | |
Layout(self) -> bool | |
LineDown(self) -> bool | |
LineUp(self) -> bool | |
Lower(self) | |
MakeModal(self, bool modal=True) | |
Move(self, Point pt, int flags=SIZE_USE_EXISTING) | |
MoveAfterInTabOrder(self, Window win) | |
MoveBeforeInTabOrder(self, Window win) | |
MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) | |
Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool | |
NewControlId() -> int (Static method) | |
NextControlId(int winid) -> int (Static method) | |
OnPaint(self, PaintEvent event) | |
PageDown(self) -> bool | |
PageUp(self) -> bool | |
PopEventHandler(self, bool deleteHandler=False) -> EvtHandler | |
PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool | |
PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool | |
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method. | |
PrepareDC(self, DC dc) | |
PrevControlId(int winid) -> int (Static method) | |
PushEventHandler(self, EvtHandler handler) | |
Raise(self) | |
Refresh(self, bool eraseBackground=True, Rect rect=None) | |
RefreshRect(self, Rect rect, bool eraseBackground=True) | |
RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool | |
ReleaseMouse(self) | |
RemoveChild(self, Window child) | |
RemoveEventHandler(self, EvtHandler handler) -> bool | |
Reparent(self, Window newParent) -> bool | |
ScreenToClient(self, Point pt) -> Point | |
ScreenToClientXY(int x, int y) -> (x,y) | |
ScrollLines(self, int lines) -> bool | |
ScrollPages(self, int pages) -> bool | |
ScrollWindow(self, int dx, int dy, Rect rect=None) | |
SetAcceleratorTable(self, AcceleratorTable accel) | |
SetAutoLayout(self, bool autoLayout) | |
SetBackgroundColour(self, Colour colour) -> bool | |
SetBackgroundStyle(self, int style) -> bool Returns the background style of the window. | |
SetBestFittingSize(self, Size size=DefaultSize) | |
SetCaret(self, Caret caret) | |
SetClientRect(self, Rect rect) | |
SetClientSize(self, Size size) | |
SetClientSizeWH(self, int width, int height) | |
SetConstraints(self, LayoutConstraints constraints) | |
SetContainingSizer(self, Sizer sizer) | |
SetCursor(self, Cursor cursor) -> bool | |
SetDefaultItem(self, Window child) -> Window | |
SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels. | |
SetDropTarget(self, DropTarget dropTarget) | |
SetEventHandler(self, EvtHandler handler) | |
SetExtraStyle(self, long exStyle) | |
SetFocusFromKbd(self) | |
SetFont(self, Font font) -> bool | |
SetForegroundColour(self, Colour colour) -> bool | |
SetHelpText(self, String text) | |
SetHelpTextForId(self, String text) | |
SetId(self, int winid) | |
SetLabel(self, String label) | |
SetMaxSize(self, Size maxSize) | |
SetMinSize(self, Size minSize) | |
SetName(self, String name) | |
SetOwnBackgroundColour(self, Colour colour) | |
SetOwnFont(self, Font font) | |
SetOwnForegroundColour(self, Colour colour) | |
Move(self, Point pt, int flags=SIZE_USE_EXISTING) | |
SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) | |
SetScrollbar(self, int orientation, int position, int thumbSize, int range, bool refresh=True) Sets the scrollbar properties of a built-in scrollbar. | |
SetScrollPos(self, int orientation, int pos, bool refresh=True) | |
SetSize(self, Size size) | |
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) Allows specification of minimum and maximum window sizes, and window size increments. | |
SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) | |
SetSizer(self, Sizer sizer, bool deleteOld=True) | |
SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) | |
SetSizeWH(self, int width, int height) | |
SetThemeEnabled(self, bool enableTheme) This function tells a window if it should use the system's "theme" code to draw the windows' background instead if its own background drawing code. | |
SetTitle(self, String title) | |
SetTmpDefaultItem(self, Window win) | |
SetToolTip(self, ToolTip tip) | |
SetToolTipString(self, String tip) | |
SetValidator(self, Validator validator) | |
SetVirtualSize(self, Size size) | |
SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) | |
SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) | |
SetVirtualSizeWH(self, int w, int h) | |
SetWindowStyleFlag(self, long style) | |
SetWindowStyleFlag(self, long style) | |
SetWindowVariant(self, int variant) | |
ShouldInheritColours(self) -> bool | |
Show(self, bool show=True) -> bool | |
Thaw(self) | |
TransferDataFromWindow(self) -> bool | |
TransferDataToWindow(self) -> bool | |
UnregisterHotKey(self, int hotkeyId) -> bool | |
Update(self) | |
UpdateWindowUI(self, long flags=UPDATE_UI_NONE) | |
UseBgCol(self) -> bool | |
Validate(self) -> bool | |
WarpPointer(self, int x, int y) | |
Inherited from EvtHandler | |
_setOORInfo(self, PyObject _self, bool incref=True) | |
AddPendingEvent(self, Event event) | |
Bind an event to an event handler. | |
Connect(self, int id, int lastId, int eventType, PyObject func) | |
Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool | |
GetEvtHandlerEnabled(self) -> bool | |
GetNextHandler(self) -> EvtHandler | |
GetPreviousHandler(self) -> EvtHandler | |
ProcessEvent(self, Event event) -> bool | |
ProcessPendingEvents(self) | |
SetEvtHandlerEnabled(self, bool enabled) | |
SetNextHandler(self, EvtHandler handler) | |
SetPreviousHandler(self, EvtHandler handler) | |
Disconencts the event handler binding for event from self. | |
Inherited from Object | |
GetClassName(self) -> String | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
CaptionBarStyle |
EmptyCaptionBarStyle = <FoldPanelBar.CaptionBarStyle ins...
|
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
pos=wx.Point(-1, -1),
size=wx.Size(-1, -1),
style=2621440,
extraStyle=0)
Default Class Constructor.
|
AddFoldPanel(self, caption='', collapsed=False, foldIcons=<wx._gdi.ImageList; proxy of C++ wxImageList instance at ..., cbstyle=<FoldPanelBar.CaptionBarStyle instance at 0x009718F0>)Adds a fold panel to the list of panels. If the flag collapsed is set to True, the panel is collapsed initially. The FoldPanel item which is returned, can be used as a reference to perform actions upon the fold panel like collapsing it, expanding it, or deleting it from the list. Use this foldpanel to add windows to it. Please consult FoldPanelBar.AddFoldPanelWindow() and wxFoldPanelBar.AddFoldPanelSeparator() how to add wxWindow items to the panels. |
AddFoldPanelSeparator(self, panel, colour=wx.Colour(0, 0, 0), Spacing=8, leftSpacing=2, rightSpacing=2)Adds a separator line to the current FoldPanel. The seperator is a simple line which is drawn and is no real component. It can be used to separate groups of controls which belong to each other. The colour is adjustable, and it takes the same Spacing, leftSpacing and rightSpacing as AddFoldPanelWindow(). |
AddFoldPanelWindow(self, panel, window, flags=1, Spacing=8, leftSpacing=2, rightSpacing=2)Adds a wxWindow derived class to the referenced FoldPanel. IMPORTANT: Make the to be created window, child of the FoldPanel. See example that follows. The flags to be used are: - wxFPB_ALIGN_WIDTH: Which means the wxWindow to be added will be alligned to fit the width of the FoldPanel when it is resized. Very handy for sizer items, buttons and text boxes. - wxFPB_ALIGN_LEFT: Alligns left instead of fitting the width of the child window to be added. Use either this one or wxFPB_ALIGN_WIDTH. The wxWindow to be added can be slightly indented from left and right so it is more visibly placed in the FoldPanel. Use Spacing > 0 to give the control an y offset from the previous wxWindow added, use leftSpacing to give it a slight indent from the left, and rightSpacing also reserves a little space on the right so the wxWindow can be properly placed in the FoldPanel. The following example adds a FoldPanel to the FoldPanelBar and adds two wxWindow derived controls to the FoldPanel: # CODE # create the FoldPanelBar >>> m_pnl = FoldPanelBar(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wxFPB_DEFAULT_STYLE, wxFPB_COLLAPSE_TO_BOTTOM) # add a foldpanel to the control. "Test me" is the caption and it is initially not collapsed. >>> item = m_pnl.AddFoldPanel("Test me", False) # now add a button to the fold panel. Mind that the button should be made child of the # FoldPanel and not of the main form. >>> m_pnl.AddFoldPanelWindow(item, wx.Button(item, ID_COLLAPSEME, "Collapse Me")) # add a separator between the two controls. This is purely a visual line that can have a certain # color and also the indents and width alligning like a control. >>> m_pnl.AddFoldPanelSeparator(item) # now add a text ctrl. Also very easy. Align this on width so that when the control gets wider # the text control also sizes along. >>> m_pnl.AddFoldPanelWindow(item, wx.TextCtrl(item, wx.ID_ANY, "Comment"), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_SPACING, 20) # ENDCODE |
ApplyCaptionStyle(self, foldpanel, cbstyle)Sets the style of the caption bar (called CaptionBar) of the FoldPanel. The changes are applied immediately. All styles not set in the CaptionBarStyle class are not applied. Use the CaptionBar reference to indicate what captionbar you want to apply the style to. To apply one style to all CaptionBar items, use ApplyCaptionStyleAll() |
ApplyCaptionStyleAll(self, cbstyle)Sets the style of all the caption bars of the FoldPanel. The changes are applied immediately. |
Collapse(self, foldpanel)Collapses the given FoldPanel reference, and updates the foldpanel bar. In the wxFPB_COLLAPSE_TO_BOTTOM style, all collapsed captions are put at the bottom of the control. In the normal mode, they stay where they are. |
Expand(self, foldpanel)Expands the given FoldPanel reference, and updates the foldpanel bar. In the wxFPB_COLLAPSE_TO_BOTTOM style, they will be removed from the bottom and the order where the panel originally was placed is restored. |
GetCaptionStyle(self, foldpanel)Returns the currently used caption style for the FoldPanel. It is returned as a CaptionBarStyle class. After modifying it, it can be set again. |
GetCount(self)Returns the number of panels in the FoldPanelBar. |
GetFoldPanel(self, item)Returns the panel associated with the index "item". See the example at the bottom of the module, especially the events for the "Collapse Me" and "Expand Me" buttons. |
GetPanelsLength(self, collapsed, expanded)Returns the length of the panels that are expanded and collapsed. This is useful to determine quickly what size is used to display, and what is left at the bottom (right) to align the collapsed panels. |
IsVertical(self)Returns wether the CaptionBar Has Default Orientation Or Not. Default is vertical. |
OnPressCaption(self, event)Handles the EVT_CAPTIONBAR event in the FoldPanelBar. |
OnSizePanel(self, event)Handles the EVT_SIZE method for the FoldPanelBar. |
RedisplayFoldPanelItems(self)Resizes the fold panels so they match the width. |
RefreshPanelsFrom(self, item)Refreshes all the panels from given index down to last one. |
RepositionCollapsedToBottom(self)Repositions all the collapsed panels to the bottom. When it is not possible to align them to the bottom, stick them behind the visible panels. The Rect holds the slack area left between last repositioned panel and the bottom panels. This needs to get a refresh. |
Class Variable Details |
---|
EmptyCaptionBarStyle
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Mar 24 21:26:20 2005 | http://epydoc.sf.net |