rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Application Framework Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvDvTreeView Class Reference

Application Framework text document view. More...

#include <ilviews/appframe/viewgadg.h>

Inheritance diagram for IlvDvTreeView:
IlvDvDocViewInterface IlvDvSerializable IlvDvInterface IlvDvProjectView

List of all members.

Public Member Functions

 IlvDvTreeView (IlvDisplay *display)
 Constructs an IlvDvTreeView object.
virtual IlvGraphicgetGraphic ()
 Gets the graphic object of the document view.

Protected Member Functions

virtual void activateSelection ()
 Activates the selected items.
virtual IlvPopupMenugetPopupMenuForItem (const IlvTreeGadgetItem *item)
 Returns the popup menu shown when a right-click occurs on the item item.
.
virtual const IlSymbolgetPopupMenuResourceId (const IlvTreeGadgetItem *item) const
 Returns the popup menu resource id that will allow you to construct the popup menu shown when a right-click occurs on the item item.
.
virtual void rightClickOnItem (IlvTreeGadgetItem *item, const IlvPoint &pt)
 Called when the user right-clicks a tree gadget item.

Detailed Description

Application Framework text document view.

Library: ilvappframe

The IlvDvTreeView is a subclass of IlvTreeGadget that implements the IlvDvDocViewInterface interface. It is used for displaying the text of the document in an IlvTreeGadget gadget.
Classes that inherit from the IlvDvTreeView class must be declared and implemented with specific macros, which allows instances of these classes to be created automatically by the document templates.
The following code sample shows how to derive from IlvDvTreeView:

 class MyTreeView
 : public IlvDvTreeView {
     IlvDvDeclareGadgetViewCreate();
  public:
      MyTreeView(IlvDisplay* display) : IlvDvTreeView(display) {}
      virtual void initializeView();
      ...
  };

  // Implementation file
  void
  MyTreeView::initializeView()
  {
      IlvDvTreeView::initializeView();
      // My initialization code here
  }
  ...
  IlvDvPreRegisterGadgetViewClass(MyTreeView, IlvDvTreeView);
  IL_BEGINMODULEINITDEF(mymodule)
      IlvDvPostRegisterDocIlvViewClass(MyTreeView, IlvDvTreeView);
  IL_ENDMODULEINITDEF(mymodule)

Constructor & Destructor Documentation

IlvDvTreeView::IlvDvTreeView ( IlvDisplay display  ) 

Constructs an IlvDvTreeView object.

This constructor creates an instance of IlvDvTreeView whose display is given by the parameter display.


Member Function Documentation

virtual IlvGraphic* IlvDvTreeView::getGraphic (  )  [virtual]

Gets the graphic object of the document view.

Must be redefined by the class that implements the interface if the class inherits from the IlvGraphic class. In this case, the redefined method only returns this object. For example, the IlvDvTextView class redefines this method to return (IlvText*)this object. By default, the method returns 0.

Returns:
The graphic object of the document view.

Reimplemented from IlvDvDocViewInterface.

virtual IlvPopupMenu* IlvDvTreeView::getPopupMenuForItem ( const IlvTreeGadgetItem item  )  [protected, virtual]

Returns the popup menu shown when a right-click occurs on the item item.
.

It is called by the method rightClickOnItem.

Parameters:
item The item under the right-click.
virtual const IlSymbol* IlvDvTreeView::getPopupMenuResourceId ( const IlvTreeGadgetItem item  )  const [protected, virtual]

Returns the popup menu resource id that will allow you to construct the popup menu shown when a right-click occurs on the item item.
.

The resource id is the name entered for the corresponding popup menu in the application editor.
It is called by the method getPopupMenuForItem.

Parameters:
item The item under the right-click.

Reimplemented in IlvDvProjectView.

virtual void IlvDvTreeView::rightClickOnItem ( IlvTreeGadgetItem item,
const IlvPoint pt 
) [protected, virtual]

Called when the user right-clicks a tree gadget item.

By default, it gets a popup menu by calling method getPopupMenuForItem and then displays it.

Parameters:
item The item under the right-click.
pt The position of the mouse when the right-click occurs.

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.