rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Application Framework Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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>

Defines

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

Detailed Description

[library ilvappframe ilviews/appframe/gadgets/events.h] Declaration of gadgets event classes.


Define 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:
name The name of the callback.
method The 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:
name The name of the gadget.
callbackName Type name of the callback that is tracked to notify the class of this event.
#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:
gadgetType The class name of the gadget that must be initialized.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.