rwlogo

Rogue Wave Views
Application Framework Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros
events.h File Reference
#include <ilviews/appframe/interf.h>
#include <ilviews/gadgets/scombo.h>
#include <ilviews/gadgets/textfd.h>
#include <ilviews/gadgets/toggle.h>
#include <ilviews/gadgets/slist.h>
#include <ilviews/gadgets/tree.h>
#include <ilviews/gadgets/matrix.h>
#include <ilviews/gadgets/sheet.h>
#include <ilviews/gadgets/hsheet.h>

Macros

#define CallbackNotification(name, method)
 Associates a method class with a gadget event. More...
 
#define GadgetNotification(name, callbackName, method, gadgetType)
 Associates a method class with a gadget event. More...
 
#define InitializeGadget(name, method, gadgetType)
 Initializes a gadget by calling a method of a class. More...
 

Detailed Description

Library: ilvappframe Declaration of gadgets event classes.

Macro Definition Documentation

#define CallbackNotification (   name,
  method 
)

Associates a method class with a gadget event.

This macro must be inserted in the interface declaration of a class. It is used to associate a method given by the parameter method with a callback of name name. When the callback is triggered, the method is called.

Parameters
nameThe name of the callback.
methodThe method that is called when the callback name is triggered.
#define GadgetNotification (   name,
  callbackName,
  method,
  gadgetType 
)

Associates a method class with a gadget event.

This macro must be inserted in the interface declaration of a class. It is used to associate a method given by the parameter method with a type callbackName of events that occurs to a gadget (whose name is given by the parameter name).

Parameters
nameThe name of the gadget.
callbackNameType name of the callback that is tracked to notify the class of this event.
methodThe method to associate.
gadgetTypeThe class name of the gadget.
#define InitializeGadget (   name,
  method,
  gadgetType 
)

Initializes a gadget by calling a method of a class.

This macro must be inserted in the interface declaration of a class. It is used to initialize a gadget specified by the name parameter by calling a method given as the parameter method.
Typically, it is used to initialize a gadget (such as a combobox that is inserted in a toolbar) by calling a method of a document view or of a document. Suppose that the document view of class TextView is a text view and that a combobox of name "StyleComboBox", inserted in a toolbar, list a set of fonts that can be applied to the text view. We want the text view to fill the combobox with the name of the fonts that can be applied to it, and then select the item of the combobox that corresponds to the font currently set to the text view.

Here is a sample of code that does this:

IlvDvBeginInterface(TextView)
InitializeGadget("StyleComboBox", fillFonts, IlvScrolledComboBox)
IlvDvEndInterface1(IlvDvTextView)
...
void
TextView::fillFonts(IlvScrolledComboBox* combo)
{
combo->addString("Courrier New");
...
IlvFont* font = getFont();
if (font)
combo->setLabel(font->getFamily(), IlTrue);
}
Parameters
nameThe name of the gadget.
methodThe method to call to initialize the gadget.
gadgetTypeThe class name of the gadget that must be initialized.

© Copyright 2015, 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.