[Classes] [Prev] [Next] [Methods]

CStatusBarAttachment

Methods Index

Heritage
Description
Usage
Public Methods
Constructor and Destructor Methods
Utility Methods

CStatusBarAttachment


Heritage

Superclass: CAttachment

Subclasses: None


Description

CStatusBarAttachment provides intelligent sizing of CStatusBars attached to a CAttachmentFrame. CStatusBarAttachment provides a mechanism (inherited from CAttachment) for requesting "fit sizes" and a "best size" for any given CStatusBar.


Usage

A CStatusBarAttachment is created directly via its constructor and is automatically attached to the bottom of the theAttachmentFrame which is passed to the constructor.

CShellWin::CShellWin(...) 
{     

// Create statusbar

CStatusBar *aStatusBar = new CCStatusBar(this);
// ... code to add items to CStatusBar.
// NOTE: it is likely that the CStatusBar will be
// created by an Architect Factory, making
// the code above unnecessary.

// Create an attachment frame that allows docking
// at all sides of the window
itsAttachmentFrame = new CAttachmentFrame(
this, CAttachmentFrame::ATTACH_ALL);

// Create an attachment object that will manage the
// CStatusBar. In addition, register attachment
// frame as a sink to allow drag-and-dock
itsStatusBarAttachment = new CStatusBarAttachment(
aStatusBar);
itsStatusBarAttachment->RegisterSink(
itsAttachmentFrame);

// Attach StatusBar to top of anAttachmentFrame and
// arrange the attachments as necessary
itsStatusBarAttachment->Attach(itsAttachmentFrame,
CAttachmentFrame::ATTACH_TOP)
itsAttachmentFrame->ArrangeAttachments();

}

Public Methods

Constructor and Destructor Methods

CStatusBarAttachment(
CAttachmentFrame *theAttachmentFrame,
CStatusBar *theStatusBar);
CStatusBarAttachment(
const CStatusBarAttachment &theAttachment);
CStatusBarAttachment& operator=(
const CStatusBarAttachment &theAttachment);
~CStatusBarAttachment(void);

Utility Methods

CStatusBar* GetStatusBar(void) const;
const RWSortedVector* GetAllFitSizes(void);
CRect GetBestSize(void);
void Attach(
CAttachmentFrame *theFrame,
CAttachmentFrame::AttachmentPoint theAttachmentPoint);
void Detach(BOOLEAN hasTitleBar = TRUE);
void Popup(CWindow *theWindow, 
BOOLEAN hasTitleBar = FALSE);
BOOLEAN IsDraggable(void) const;


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.