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

CSplitter

Methods Index

Heritage
Description
Classes
Protected Data Members
Enums
Public Methods
Constructor, Destructor, and Initializer Methods
Device-independent Tracking Interface:
Immutable Accessors
Wide Interface Overrides
Protected Methods
Implementation
Helper Services
Helper Methods
Virtual Constructors
Helper Class:
CSplitter::CPane
Heritage
Description
Protected Data Members
Public Methods
Service Methods
Decoration Methods
Protected Methods
Constructor and Destructor Methods
Implementation Methods
Helper Class:
CSplitter::CSplitterMouseAgent
Heritage
Description
Protected Data Members
Public Methods
Constructor and Destructor Methods
Mouse Handling Overridden Methods

CSplitter


Heritage

Superclass: CSubview

Subclasses: CMappedSplitter, CFixedSplitter

Helper Classes: CSplitter::CPane, CSplitter::CSplitterMouseAgent


Description

CSplitter serves as the abstract base class for mapped and fixed splitters. Derived classes must call ISplitter() after construction and override OnAdjustPanes() to accept or reject adjusted pane sizes. CSplitter manages tracking and adjustment of dynamic pane sizes (attached to splitbars): the two subclasses, CMappedSplitter and CFixedSplitter implement appropriate behavior in response. See the "Usage" sections of these two classes for usage examples.

CSplitter provides a tracking interface that can be manipulated by device agents, such as a mousehandler. Splitters provide a default mouse agent; however, keyboard and batch agents could also be created to move the splitters, for example, in response to arrow keys.


Protected Data Members

Attributes:

CSplitterMouseAgent* itsMouseAgent;
RWGDlist(CPane) itsPanes;
RWGDlist(CHorizontalSplitBar) itsHorSplits;
RWGDlist(CVerticalSplitBar) itsVerSplits;
CHorizontalSplitBar* itsTrackedHorSplit; //cache
CVerticalSplitBar* itsTrackedVerSplit; //cache
CursorState itsCurrentCursor;
CURSOR itsNormalCursor;
CURSOR itsHorGrabCursor;
CURSOR itsHorDragCursor;
CURSOR itsVerGrabCursor;
CURSOR itsVerDragCursor;
CURSOR itsHVGrabCursor;
CURSOR itsHVDragCursor;

Enums

CursorState

CS_NORMAL,
CS_SPLITTER_GRAB_HOR,
CS_SPLITTER_DRAG_HOR,
CS_SPLITTER_GRAB_VER,
CS_SPLITTER_DRAG_VER,
CS_SPLITTER_GRAB_HV,
CS_SPLITTER_DRAG_HV


Public Methods

Constructor, Destructor, and Initializer Methods

CSplitter(
CSubview* theEnclosure,
const CRect& theRect,
CURSOR theHorGrabCursor = CURSOR_ARROW,
CURSOR theHorDragCursor = CURSOR_ARROW,
CURSOR theVerGrabCursor = CURSOR_ARROW,
CURSOR theVerDragCursor = CURSOR_ARROW,
CURSOR theHVGrabCursor = CURSOR_ARROW,
CURSOR theHVDragCursor = CURSOR_ARROW);
virtual ~CSplitter();
virtual void ISplitter();

Device-independent Tracking Interface:

virtual BOOLEAN IsSplitTracking() const;
virtual void TrackSplitBegin(const CPoint &theGlobalHit);
virtual void TrackSplitMove(
const CPoint &theGlobalHit);
virtual void TrackSplitEnd();

Immutable Accessors

const CPane* QueryPane(long thePaneId) const;
int GetNumberOfPanes() const;

Wide Interface Overrides

virtual void DoDraw(const CRect &theRegion = MAXRect);
virtual void DoSize(const CRect &theRegion);

Protected Methods

Implementation

virtual void OnAdjustPanes(
CHorizontalSplitBar* theHorSplit,
UNITS theHorAxis,
CVerticalSplitBar* theVerSplit,
UNITS theVerAxis) = 0;

Helper Services

virtual void SetSplitCursor(CursorState theCursor);
virtual CHorizontalSplitBar* FindHorSplit(
const CPoint &theGlobalHit);
virtual CVerticalSplitBar* FindVerSplit(
const CPoint &theGlobalHit);
virtual void DoNormalizePanes(
CHorizontalSplitBar* theHorSplit,
UNITS theHorAxis,
CVerticalSplitBar* theVerSplit,
UNITS theVerAxis);
virtual void DoAdjustPanes(
CHorizontalSplitBar* theHorSplit,
UNITS theHorAxis,
CVerticalSplitBar* theVerSplit,
UNITS theVerAxis);
virtual void AdjustPane(
CPane* thePane,
CHorizontalSplitBar* theHorSplit,
UNITS theHorAxis,
CVerticalSplitBar* theVerSplit,
UNITS theVerAxis);

Helper Method

virtual CHorizontalSplitBar* CreateHorSplitBar(
const CRect& theRange,
UNITS theAxisLoc);
virtual CVerticalSplitBar* CreateVerSplitBar(
const CRect& theRange,
UNITS theAxisLoc);

Virtual Constructors

virtual CSplitterMouseAgent* ConstructMouseAgent();
virtual CHorizontalSplitBar* ConstructHorSplitBar(
const CRect& theRange,
UNITS theAxisLoc);
virtual CVerticalSplitBar* ConstructVerSplitBar(
const CRect& theRange,
UNITS theAxisLoc);

Helper Class:


CSplitter::CPane


Heritage

Superclass: None

Subclasses: CFixedSplitter::CFixedPane


Description

CPane is an embedded class used as a helper for CSplitter.


Protected Data Members

CPane attributes:

long itsId;
CRect itsFrame;
CRect itsAdjustedFrame;
BOOLEAN isAdjusted;
CView* itsView;
CVerticalSplitBar* itsDynLeft;
CVerticalSplitBar* itsDynRight;
CHorizontalSplitBar* itsDynTop;
CHorizontalSplitBar* itsDynBottom;


Public Methods

Service Methods

long GetId() const;
CRect GetFrame() const;
CView* GetView() const;

Decoration Methods

BOOLEAN IsLeftBorder() const;
BOOLEAN IsRightBorder() const;
BOOLEAN IsTopBorder() const;
BOOLEAN IsBottomBorder() const;

Protected Methods

Constructor and Destructor Methods

CPane();
virtual ~CPane();

Implementation Methods

CRect GetAdjustedFrame() const;
BOOLEAN IsAdjusted() const;
void ResetAdjusted();
void ApplyAdjustedFrame();

Helper Class:


CSplitter::CSplitterMouseAgent


Heritage

Superclass: CMouseHandler

Subclasses: CMappedSplitter::CMappedSplitterMouseAgent


Description

CSplitterMouseAgent is an abstract, embedded class, derived from CMouseHandler and used for mouse handling with CSplitter.


Protected Data Members

Mouse action targets:

CSplitter* itsSplitter;
short itsTrackButton;


Public Methods

Constructor and Destructor Methods

CSplitterMouseAgent(
CSplitter* theSplitter,
short theTrackButton = 0 /* left button */);
virtual ~CSplitterMouseAgent();

Mouse Handling Overridden Methods

The following CMouseHandler methods are overridden to manipulate the splitter through the tracking interface.

virtual BOOLEAN DoDown(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoUp(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoMove(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN DoDouble(
CPoint& theLocation,
short& theButton,
BOOLEAN& isShiftKey,
BOOLEAN& isControlKey);
virtual BOOLEAN UsesGlobalCoords();


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

support@xvt.com


Visit our online help desk for tech support

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