Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::AbstractComponentEditor Class Reference

Basic implementation of the ComponentEditor interface. More...

#include <vcf/ApplicationKit/AbstractComponentEditor.h>

Inheritance diagram for VCF::AbstractComponentEditor:

VCF::Object VCF::ComponentEditor VCF::Interface VCF::AbstractControlEditor List of all members.

Public Member Functions

 AbstractComponentEditor ()
virtual ~AbstractComponentEditor ()
virtual void initialize ()
 This is called immediately after the component has been created, after the caller has made the setComponent() call on the editor.
virtual int getAttributes (const uint32 &index)
 This method returns a mask of potential attributes for the command at the given index.
virtual int getCommandParentIndex (const uint32 &index)
 Returns the index value of the command's parent if one exists.
virtual CommandcreateCommand (const uint32 &index)
 Retreives a new command instance associated with this index.
virtual uint32 getCommandCount ()
 Returns the number of unique commands associated with this component editor.
virtual int getDefaultCommandIndex ()
 Returns the editors default command index.
virtual ComponentgetComponent ()
virtual void setComponent (Component *component)
 Sets the component for this editor.
virtual void copy ()
void setCommandCount (uint32 val)
void setAttributes (const uint32 &index, const int &attribute)
void setParentIndex (const uint32 &index, const int &parentIndex)

Protected Attributes

int defaultCommandIndex_
std::vector< int > attributes_
std::vector< int > parentIndices_
Componentcomponent_

Detailed Description

Basic implementation of the ComponentEditor interface.

Useful when creating custom component editors.


Constructor & Destructor Documentation

VCF::AbstractComponentEditor::AbstractComponentEditor  ) 
 

virtual VCF::AbstractComponentEditor::~AbstractComponentEditor  )  [virtual]
 


Member Function Documentation

virtual void VCF::AbstractComponentEditor::copy  )  [virtual]
 

Implements VCF::ComponentEditor.

virtual Command* VCF::AbstractComponentEditor::createCommand const uint32 index  )  [virtual]
 

Retreives a new command instance associated with this index.

Parameters:
uint32 index of the command to retrieve
Returns:
Command* returns a NEW instance of the Command object to be associated with the given index.
Note: It is the callers responsibility to clean up memory and the caller owns the command after this call.

Implements VCF::ComponentEditor.

virtual int VCF::AbstractComponentEditor::getAttributes const uint32 index  )  [virtual]
 

This method returns a mask of potential attributes for the command at the given index.

Implements VCF::ComponentEditor.

virtual uint32 VCF::AbstractComponentEditor::getCommandCount  )  [virtual]
 

Returns the number of unique commands associated with this component editor.

Returns:
uint32 the number of commands for the editor

Implements VCF::ComponentEditor.

virtual int VCF::AbstractComponentEditor::getCommandParentIndex const uint32 index  )  [virtual]
 

Returns the index value of the command's parent if one exists.

If no parent exists, then the value returned is -1. Most comamnds will not have a parent. However this is used if you have a complex set of commands that make sense to nest in a heirarchy.

Implements VCF::ComponentEditor.

virtual Component* VCF::AbstractComponentEditor::getComponent  )  [inline, virtual]
 

Returns:
Component the component this Editor is currently attached to.

Implements VCF::ComponentEditor.

virtual int VCF::AbstractComponentEditor::getDefaultCommandIndex  )  [inline, virtual]
 

Returns the editors default command index.

This is the command that will be executed when the component is double clicked on. Return a value of -1 to indicate that there is no default command index.

Implements VCF::ComponentEditor.

virtual void VCF::AbstractComponentEditor::initialize  )  [virtual]
 

This is called immediately after the component has been created, after the caller has made the setComponent() call on the editor.

Implements VCF::ComponentEditor.

void VCF::AbstractComponentEditor::setAttributes const uint32 index,
const int &  attribute
 

void VCF::AbstractComponentEditor::setCommandCount uint32  val  ) 
 

virtual void VCF::AbstractComponentEditor::setComponent Component component  )  [virtual]
 

Sets the component for this editor.

Implements VCF::ComponentEditor.

void VCF::AbstractComponentEditor::setParentIndex const uint32 index,
const int &  parentIndex
 


Member Data Documentation

std::vector<int> VCF::AbstractComponentEditor::attributes_ [protected]
 

Component* VCF::AbstractComponentEditor::component_ [protected]
 

int VCF::AbstractComponentEditor::defaultCommandIndex_ [protected]
 

std::vector<int> VCF::AbstractComponentEditor::parentIndices_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information