Gadgets > Creating GUI Applications with Rogue Wave Views Studio > Editing Applications > Editing an Application > The Panel Class Inspector
 
The Panel Class Inspector
To inspect a Panel class, click the Panel Class Inspector icon in the Panel Class palette toolbar.
The Panel Class inspector appears:
Panel Class Inspector
There are four notebook pages in the Panel Class inspector, each containing a set of properties of the inspected panel class.
The General Page
Class  Use this field to name the C++ panel class. The class name must be a valid C++ class name. By default, Rogue Wave Views Studio names this class by capitalizing the first letter of the corresponding buffer name.
Base Class  Use this field to specify the base class for the class generated. By default for gadget buffers, Rogue Wave Views Studio derives the generated class from IlvGadgetContainer.
Instead of deriving the generated panel class from IlvGadgetContainer, you can specify your own base class. In this case, the given class must be derived from IlvGadgetContainer and include compatible constructors. Of course, the compiler must know the declaration of your base class when compiling the generated files, so it must be inserted or included in the generated file. See The Header and Source Pages.
File Name   This field shows the name of the file that contains the selected panel class. It cannot be edited.
Data  This field displays the directory where the panel data file (.ilv file) is saved.
Header  Use this field to specify the directory where the panel class header file is generated. If this field is empty, the header file is generated in the same directory as the application header file.
Source  Use this field to indicate the directory where the panel class source file is generated. If this field is empty, the source file is generated in the same directory as the application source file.
The Options Page
The Options page of the Panel Class inspector is illustrated below.
Options Page of the Panel Class Inspector
The Generate section contains the following:
Data  Select this toggle button to have Rogue Wave Views Studio generate the data string in the C++ panel class code so that its constructor does not need to read the data file at runtime. The code generated with data is used only on the UNIX® platforms. On Windows® systems, the string data generated is not used.
Names  Select this toggle button to have Rogue Wave Views Studio generate member functions that return the named objects in your panel. For example, if you have a text field named MyTextField in your panel, the following member function is generated:
IlvTextField* getMyTextField() const
{ return (IlvTextField*)getObject("MyTextField"); }
The generated member functions are always named following this rule.
Callback Declarations  Rogue Wave Views Studio provides you with a simple way to deal with callbacks. When the Callback Declarations toggle button is selected, it generates an IlvGraphicCallback function and declares a default virtual member function. The generated IlvGraphicCallback invokes the corresponding virtual member function, which has the same name as the callback you specified in Rogue Wave Views Studio. Therefore, the names you use for callbacks must be valid C++ function names.
The Callback Declarations toggle button must be selected for the Callback Definitions toggle button to have any effect.
Callback Definitions  The default definition code (the body function) for these callback virtual member functions can be generated, letting you test your application before defining the real callbacks. When you select the Callbacks Definitions toggle button, you redefine your own versions of the callbacks in your derived classes.
If you do not want these function definitions to be generated, do not select the Callback Definitions toggle button. This is useful if you do not want to derive a class from the generated class. In this case, you can write your own definition of these member functions in a separate file that will not be erased by future code generations.
The callback registering task is generated in the C++ code so that you only have to define the callback methods.
The Optional Constructors section has two toggle buttons that let you generate your panel class to use within the native system views.
System View   Select this toggle button if you want to create a panel by using an existing system view.
System View Child   Select this toggle button if you want to create your panel as a child window of an existing system view.
The Header and Source Pages
To insert your own code in the generated panel class header or source files, click the Header or Source page of the Panel Class inspector.
Source Page in the Panel Class Inspector
Code for the header file  The text you enter in this field is inserted as typed in the panel class header file, after the generated #include statements and before the declaration of the generated class. If you want to derive the generated class from a class other than IlvGadgetContainer, you have to insert the #include statement to include the file declaring your base class. Of course, instead of inserting code, you can use this feature to comment your panel class.
Code for the source file  The text you enter in this field is inserted as typed in the panel class source file just before defining the generated member functions. You can use this text to comment the generated file or to insert any C++ code.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.