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

CFixedSplitter

Methods Index

Heritage
Description
Usage
Classes
Protected Data Members
Public Methods
Constructor, Destructor and Initializer Methods
CFixedPane Service Methods
Protected Methods
Virtual Constructor Method

Helper Class:
CFixedSplitter::CFixedPane
Heritage
Description
Public Data Members
Friends
Protected Data Members
Public Methods
CFixedSplitter Service Methods

Derived Class:
CHorizontalFixedSplitter
Heritage
Description
Public Methods
Constructor and Destructor Methods
Service Methods

Derived Class:
CVerticalFixedSplitter
Heritage
Description
Public Methods
Constructor and Destructor Methods
Service Methods

CFixedSplitter


Heritage

Superclass: CSplitter

Subclasses: CHorizontalFixedSplitter, CVerticalFixedSplitter

Helper Class: CFixedSplitter::CFixedPane


Description

A fixed splitter is essentially a user-driven geometry manager. Use this when you need to allow the user to adjust adjacent panes of dissimilar information. Typical examples of a fixed splitter are directory/file browsers. The left pane is a hierarchical view of the directories, while the right pane is the file view.

Note: If you are splitting the same view of information, use a mapped splitter (see CMappedSplitter).


Usage

Fixed splitter usage is limited to a static layout. That is, you must know the layout of the fixed splitter ahead of time. Also, you must add panes one at a time to a fixed splitter via IFixedSplitter(). For example, in the case of a horizontal fixed splitter containing 3 panes, you would call IFixedSplitter() first with pane 1, second with pane 2, and third with pane 3.

[Create vertical splitter]

CFixedSplitter* aBrowser = new
CVerticalFixedSplitter(
this,
GetFrame().GetInflatedRect(-2.0F),
2,
SPLITTER_GRAB_H,
SPLITTER_DRAG_H);
aBrowser->SetGlue(ALLSTICKY);
aBrowser->IFixedSplitter();

[Create horizontal splitter]

CFixedSplitter* aTopRow = new
CHorizontalFixedSplitter(
aBrowser,
aBrowser->GetPaneCreationSize(0),
3,
SPLITTER_GRAB_V,
SPLITTER_DRAG_V);
aTopRow->SetGlue(ALLSTICKY);
aTopRow->IFixedSplitter();

... Population of hor splitter ommited ...

[Place horizontal splitter in top vertical]

aBrowser->IFixedPane(kMethodImpPane, aTopRow);

[Create scroll text for bottom of vertical splitter]

NScrollText* aEdit = new NScrollText(
aBrowser, aBrowser->GetPaneCreationSize(1));
aEdit->SetAttribute(TX_BORDER, FALSE);
// turn off border
aEdit->Append(kMethodImplementation);

[Place scroll text in bottom vertical]

aBrowser->IFixedPane(kMethodImpPane, aEdit);

Protected Data Members

int itsNumOfPanes;
UNITS itsSplitSize; //cache of splitbar size


Public Methods

Constructor, Destructor and Initializer Methods

CFixedSplitter(CSubview* theEnclosure, 
const CRect& theRect, int theNumOfPanes);
virtual ~CFixedSplitter();
virtual void IFixedSplitter();

CFixedPane Service Methods

virtual void IFixedPane(
long theId,
CView* theView,
const CRect& theMinFrame = MAXRect,
const CRect& theMaxFrame = MAXRect) = 0;
virtual CRect GetPaneCreationSize(int theIndex) const = 0;

Protected Methods

virtual CFixedPane* CreateFixedPane(
CView* thePane,
long theId,
const CRect& theMinFrame,
const CRect& theMaxFrame);
virtual void OnAdjustPanes(
CHorizontalSplitBar* theHorSplit,
UNITS theHorAxis,
CVerticalSplitBar* theVerSplit,
UNITS theVerAxis);
virtual void DoNormalizePanes(
CHorizontalSplitBar* theHorSplit,
UNITS theHorAxis,
CVerticalSplitBar* theVerSplit,
UNITS theVerAxis);

Virtual Constructor Method

virtual CFixedPane* ConstructFixedPane();

Helper Class:


CFixedSplitter::CFixedPane


Heritage

Superclass: CSplitter::CPane

Subclasses: None


Description

CFixedPane is an embedded helper class derived from CSplitter::CPane and used to service CFixedSplitter.


Public Data Members

Friends

friend CFixedSplitter
friend class CHorizontalFixedSplitter
friend class CVerticalFixedSplitter


Protected Data Members

CRect itsMinFrame;
CRect itsMaxFrame;


Public Methods

CFixedSplitter Service Methods

const CRect& GetMinFrame() const;
const CRect& GetMaxFrame() const;

Derived Class:


CHorizontalFixedSplitter


Heritage

Superclass: CFixedSplitter

Subclasses: None


Description

CHorizontalFixedSplitter is used with CFixedSplitter to create and destroy horizontal fixed splitters.


Public Methods

Constructor and Destructor Methods

CHorizontalFixedSplitter(
CSubview* theEnclosure,
const CRect& theRect,
int theNumOfPanes,
CURSOR theGrabCursor = CURSOR_ARROW,
CURSOR theDragCursor = CURSOR_ARROW);
virtual ~CHorizontalFixedSplitter();

Service Methods

virtual void IFixedPane(
long theId,
CView* theView,
const CRect& theMinFrame = MAXRect,
const CRect& theMaxFrame = MAXRect);
virtual CRect GetPaneCreationSize(int theIndex) const;

Derived Class:


CVerticalFixedSplitter


Heritage

Superclass: CFixedSplitter

Subclasses: None


Description

CVerticalFixedSplitter is used with CFixedSplitter to create and destroy vertical fixed splitters.


Public Methods

Constructor and Destructor Methods

CVerticalFixedSplitter(
CSubview* theEnclosure,
const CRect& theRect,
int theNumOfPanes,
CURSOR theGrabCursor = CURSOR_ARROW,
CURSOR theDragCursor = CURSOR_ARROW);
virtual ~CVerticalFixedSplitter();

Service Methods

virtual void IFixedPane(
long theId,
CView* theView,
const CRect& theMinFrame = MAXRect,
const CRect& theMaxFrame = MAXRect);
virtual CRect GetPaneCreationSize(
int theIndex) 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.