Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site













SourceForge.net Logo

DockableCtrl

The DockableCtrl class provide a common container and interface for Ctrl's that wish to be managed by the Docking framework. It is deliberately light-weight but provides methods for:

Setting size-hints that allow the DockWindow to better size and place the control with the dock frames

Property methods for setting an icon, title and window group

A Chameleon style interface enabling a custom appearance of the docking handle (the frame that displays the title and icon)

Status methods for determining it's current position in the framework/layout.

 

class DockableCtrl : public ParentCtrl

 

Callback1<Bar &> WhenMenuBar

 Executed when the dockable ctrl's window menu is shown. This when the menu button is pressed or a context menu is activated on the handle/title bar of the window.

 

virtual void WindowMenu(Bar &bar)

 Override called when the window menu is shown. Default behaviour is to execute WhenMenuBar.

 

const Image & GetIcon()

 Returns the image assigned to the ctrl.

 

DockableCtrl & Icon(const Image& m)

 Sets the image assigned to the ctrl.

 

DockableCtrl & Title(const char *_title)

 Sets the ctrl's title.

 

DockableCtrl & Title(const WString& _title)

 Sets the ctrl's title.

 

const WString & GetTitle()

 Returns the current title.

 

DockableCtrl & SizeHint(const Size &min, const Size &max = Null, const Size &std = Null)

 Shortcut to setting minimum, standard and maximum size to min max and std respectively. If Null is passed the hint remains unchanged.

 

void SetMinSize(Size sz)

 Sets the minimum size for the ctrl to sz.

 

void SetMaxSize(Size sz)

 Sets the maximum size of the ctrl to sz.

 

void SetStdSize(Size sz)

 Sets the best/standard size of the ctrl to sz

 

virtual Size GetMinSize() const

 Returns the ctrl's minimum size.

 

virtual Size GetMaxSize() const

 Returns the ctrl's maximum size.

 

virtual Size GetStdSize() const

 Returns the ctrl's best/standard size.

 

DockableCtrl & SetStyle(const Style &s)

 Sets the current Chameleon style to s. s should not be allowed to run out of scope or otherwise be destroyed by the calling function.

 

const Style & GetStyle()

 Returns th current Chameleon style.

 

static const Style& StyleDefault()

 Returns the default Chameleon style.

 

static const Style& StyleDefaultVert()

 Returns the default Chameleon style for vertical handle.

 

virtual const String &GetGroup() const

 Returns the current group the ctrl is a member of, or Null if it is not in a group.

 

virtual DockableCtrl &SetGroup(const String &g)

 Sets the ctrls group to g.

 

DockableCtrl & AllowDockAll()

 Allows docking for all alignments. Both the ctrl and the DockWindow managing it must allow docking.

 

DockableCtrl & AllowDockNone()

 Denys docking for all alignments. Both the ctrl and the DockWindow managing it must allow docking.

 

DockableCtrl & AllowDockLeft(bool v = true)

Allows/Denys docking permission for the left frame. Both the ctrl and the DockWindow managing it must allow docking.

 

DockableCtrl & AllowDockTop(bool v = true)

 Allows/Denys docking permission for the top frame. Both the ctrl and the DockWindow managing it must allow docking.

 

DockableCtrl & AllowDockRight(bool v = true)

 Allows/Denys docking permission for the right frame. Both the ctrl and the DockWindow managing it must allow docking.

 

DockableCtrl & AllowDockBottom(bool v = true)

 Allows/Denys docking permission for the bottom frame. Both the ctrl and the DockWindow managing it must allow docking.

 

DockableCtrl & AllowDock(int a, bool v = true)

 Allows/Denys docking permission for the frame indicated by alignment a. Both the ctrl and the DockWindow managing it must allow docking.

 

bool IsDockAllowed(int a)

 Returns true if docking is allowed for alignment a. Does not account for permissions set on the managing DockWindow.

 

bool IsFloating() const

 Returns true if the ctrl is currently floating (open as a normal child window).

 

bool IsDocked() const

 Returns true if the window is docked at any alignment.

 

bool IsAutoHide() const

 Return true if the ctrl is currently being auto-hidden.

 

bool IsTabbed() const

 Returns true if the ctrl is currently displayed as a tab.

 

bool IsHidden() const

 Returns true if the ctrl is current hidden/closed.

 

int GetDockAlign() const

 Returns the alignment if the ctrl is docked.

 

void Highlight()

 Displays a visual highlight on the ctrl to indicate it's position to the user.

 

DockableCtrl()

 Class Contructor.

 

 

Last edit by cxl on 09/02/2011. Do you want to contribute?. T++