Skip to content

Latest commit

 

History

History
248 lines (119 loc) · 5.47 KB

PyCControlBar.md

File metadata and controls

248 lines (119 loc) · 5.47 KB

PyCControlBar

PyCControlBar Object

A class which encapsulates an MFC CControlBar

. Derived from a PyCWnd object.

Methods

  • CalcDynamicLayout

    The framework calls this member function to calculate the dimensions of a dynamic toolbar. 

  • CalcFixedLayout

    Calculates the horizontal size of a control bar 

  • EnableDocking

    Specifies whether the control bar supports docking and the sides of its parent window. 

  • EraseNonClient

     

  • GetBarStyle

    Retrieves the control bar style settings. 

  • GetCount

    Returns the number of non-HWND elements in the control bar. 

  • GetDockingFrame

    Returns the frame window to which a control bar is docked. 

  • IsFloating

    Returns a nonzero value if the control bar in question is a floating control bar. 

  • SetBarStyle

    Modifies the control bar style settings. 

  • ShowWindow

    Shows the window, and recalculates the toolbar layout. 

Properties

  • PyCFrameWnd dockSite

    Current dock site, if dockable

  • PyCWnd dockBar

    Current dock bar, if dockable

  • PyCDockContext dockContext

    Used during dragging

  • int dwStyle

    creation style (used for layout)

  • int dwDockStyle

    indicates how bar can be docked

PyCControlBar.CalcDynamicLayout

int = CalcDynamicLayout(length, dwMode

) The framework calls this member function to calculate the dimensions of a dynamic toolbar.

Parameters

  • length : int

    The requested dimension of the control bar, either horizontal or vertical, depending on dwMode.

  • dwMode : int

    A combination of flags.

CalcDynamicLayout() Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be

done via CPythonControlBar::CalcDynamicLayout

.

See Also

  • CPythonControlBar::CalcDynamicLayout

PyCControlBar.CalcFixedLayout

int = CalcFixedLayout(bStretch, bHorz

) Calculates the horizontal size of a control bar

Parameters

  • bStretch : int

    Indicates whether the bar should be stretched to the size of the frame. The bStretch parameter is nonzero when the bar is not a docking bar (not available for docking) and is 0 when it is docked or floating (available for docking).

  • bHorz : int

    Indicates that the bar is horizontally or vertically oriented.

CalcFixedLayout() Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be

done via CPythonControlBar::CalcFixedLayout

.

See Also

  • CPythonControlBar::CalcFixedLayout

PyCControlBar.EnableDocking

EnableDocking(style) pecifies whether the control bar supports docking and the sides of its parent window.

Parameters

  • style : int

    Enables a control bar to be docked.

PyCControlBar.EraseNonClient

EraseNonClient()

PyCControlBar.GetBarStyle

int = GetBarStyle() Retrieves the control bar style settings.

PyCControlBar.GetCount

int = GetCount() Returns the number of non-HWND elements in the control bar.

PyCControlBar.GetDockingFrame

PyCFrameWnd = GetDockingFrame() Returns the frame window to which a control bar is docked.

PyCControlBar.IsFloating

int = IsFloating() Returns a nonzero value if the control bar in question is a floating control bar.

OnBarStyleChange() Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be

done via CPythonControlBar::OnBarStyleChange

.

OnUpdateCmdUI(frame, bDisableIsNoHandler

)

Parameters

PyCControlBar.SetBarStyle

SetBarStyle(style) Modifies the control bar style settings.

Parameters

  • style : int

    The new style

PyCControlBar.ShowWindow

int = ShowWindow() Shows the toolbar, and recalculates the button layout.

Comments

This method is provided for convenience. For further details, see

PyCWnd::ShowWindow and PyCFrameWnd::RecalcLayout

Return Value

The return value is that returned from PyCWnd::ShowWindow