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

CToolPalette

Methods Index

Heritage
Description
Usage
Protected Data Members
Friends
Public Methods
Constructor, Destructor, and Initializer Methods
Utility Methods
Protected Methods

CToolPalette


Heritage

Superclass: None

Subclasses: None

Helper Class: CToolPaletteAttachment


Description

CToolPalette provides the functionality required for a palette of images with the following qualifications:


Usage

CToolPalette serves as a logical palette object definition. Its interface allows you build palettes consisting of plain image buttons as well as image buttons representing nested subpalettes.

The CToolPalette interface allows you to operate upon the palette's tools in a recursive manner. For instance, the removal method operates recursively down the tools and subtools of the palette until it finds the tool to remove.

To use palettes, you normally:


Protected Data Members

CToolPaletteAttachment itsPopupAttachment; Internal attachment
CToolPaletteAttachment itsStickyAttachment; Internal attachment
RWGSlist(CTool) itsTools; List of nested tools
CToolPalette itsParentPalette; Parent CToolPalette
long itsSelectedTool; Selected tool ID
CStringRW itsTitle; Title for titlebar
CDragSource itDragSource; Drag and drop support
long itsEnterCommand; Drag and drop support
long itsLeaveCommand; Drag and drop support


Friends

friend class CToolPaletteButton;
friend class CToolPaletteAttachment;


Public Methods

Constructor, Destructor, and Initializer Methods

CToolPalette(const CStringRW& theTitle = NULLString);
CToolPalette(const CToolPalette &theToolPalette);
CToolPalette & operator= (const CToolPalette &theToolPalette);
~CToolPalette();

Utility Methods

void AppendTool(
CImage* theImage,
long theId,
BOOLEAN isDraggable = FALSE,
BOOLEAN isEnabled = TRUE);
void AppendTool(
CImage* theImage,
long theId,
CToolPalette* theSubPalette,
BOOLEAN isEnabled = TRUE);
void InsertTool(
size_t theLocation,
CImage* theImage,
long theId,
BOOLEAN isDraggable = FALSE,
BOOLEAN isEnabled = TRUE);
void InsertTool(
size_t theLocation,
CImage* theImage,
long theId,
CToolPalette* theSubPalette,
BOOLEAN isEnabled = TRUE);
CToolPalette* RemoveTool(long theId);
CToolPalette* GetParent(void);
void AppendSeparator(void);
void InsertSeparatorAfter(long theId);
void RemoveSeparatorAfter(long theId);
void RemoveAllSeparators(BOOLEAN itIsRecursive = FALSE);
void EnableTool(long theId, BOOLEAN isEnabled);
BOOLEAN IsToolEnabled(long theId) const;
void SelectTool(long theId);
long GetSelectedTool(void) const;
void DeselectTools(void);
void DeselectAllTools(void);
void DeselectLocalTools(void);
const CImage* GetToolImage(long theId);
void CloseSubPalettes(CToolPalette* anException = (CToolPalette *) NULL);
void ClosePalettes(void);
void CloseAllPalettes(void);
CToolPaletteAttachment* Popup(
CWindow* theWindow,
CPoint theTopLeft,
long theSelectCommand = NULLcmd,
BOOLEAN hasTitleBar = TRUE,
CAttachmentFrame* theFrame = NULL);
CToolPaletteAttachment* PopupDetached(
CWindow* theWindow,
CPoint theTopLeft,
long theSelectCommand = NULLcmd,
BOOLEAN hasTitleBar = TRUE,
CAttachmentFrame* theFrame = NULL);
void SetDragSource(CDragSource *theDragSource);
CDragSource* GetDragSource(void);
void SetTitle(const CStringRW& theNewTitle);
const CStringRW& GetTitle(void) const;
void SetCommands(long theEnterCommand, long theLeaveCommand);
long GetEnterCommand(void);
long GetLeaveCommand(void);

Protected Methods

CTool* FindTool(
long theId,
CToolPalette** aFoundPalette = (CToolPalette**)NULL,
int* aFoundIndex = (int*) NULL);
CTool* FindSubTool(
RWGSlist(CTool)* theSearchList,
long theId,
int* aFoundIndex = (int *)NULL);
virtual CToolPaletteAttachment* ConstructAttachment(
CWindow* theWindow,
long theCommand);


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

support@xvt.com


Visit our online help desk for tech support

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