home *** CD-ROM | disk | FTP | other *** search
-
-
-
- VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg((((3333xxxx)))) VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg((((3333xxxx))))
-
-
-
- NNNNAAAAMMMMEEEE
- VkGenericDialog - An abstract class that supports custom dialog managers
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- VkDialogManager : VkComponent : VkCallbackObject
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <Vk/VkGenericDialog.h>
-
- PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
- VkGenericDialog(const char* name);
- virtual void ~VkGenericDialog(void);
-
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The VkGenericDialog class is intended to support dialogs that are
- not included as part of the standard Motif dialog set. The class
- uses the caching mechanisms and posting functions of the
- VkDialogManager to manipulate an XmTemplateDialog widget. The
- VkDialogManager class handles adding buttons to the dialog. Derived
- classes are expected to create the contents of the dialog's work
- area.
-
-
-
- DDDDEEEERRRRIIIIVVVVIIIINNNNGGGG SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSSEEEESSSS
- Derived classes can define new types of dialogs by overriding the
- _c_r_e_a_t_e_D_i_a_l_o_g() member function. The overriding function must call
- _V_k_G_e_n_e_r_i_c_D_i_a_l_o_g::_c_r_e_a_t_e_D_i_a_l_o_g() first, then add children to the
- widget obtained from that function.
-
- The following class creates an example dialog that displays a pixmap
- of the X logo. The header file could be implemented as follows:
-
-
- /////////////////////////////////////////////////////////////////
- // XLogoDialog.h Sample Pixmap Dialog
- ////////////////////////////////////////////////////////////////
- #include <Vk/VkApp.h>
- #include <Vk/VkSimpleWindow.h>
- #include <Vk/VkGenericDialog.h>
-
- #include <Vk/VkGenericDialog.h>
-
- class XLogoDialog : public VkGenericDialog {
-
- protected:
-
- virtual Widget createDialog(Widget parent);
-
- public:
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg((((3333xxxx)))) VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg((((3333xxxx))))
-
-
-
- XLogoDialog(const char *name) :
- VkGenericDialog(name) { };
- };
-
-
-
- The single non-inline member function, _c_r_e_a_t_e_D_i_a_l_o_g() could be
- written as follows:
-
-
- /////////////////////////////////////////////////////////
- // XLogoDialog.C Sample Pixmap Dialog
- /////////////////////////////////////////////////////////
-
- Widget XLogoDialog::createDialog(Widget parent)
- {
- Pixel fg, bg;
- Widget base, label;
-
- // Call base class to create dialog template
-
- base = VkGenericDialog::createDialog(parent);
-
- // Add a child of our own, a label with a pixmap
-
- label = XmCreateLabel(base, "label",
- NULL, 0);
-
- XtVaGetValues(label,
- XmNforeground, &fg,
- XmNbackground, &bg,
- NULL);
-
- /* Create a pixmap */
-
- Pixmap pix = XmGetPixmap(XtScreen(label),
- "xlogo64",
- fg, bg);
-
- XtVaSetValues(label,
- XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, pix,
- NULL);
-
- XtManageChild(label);
-
- // return the dialog widget
-
- return base;
- }
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg((((3333xxxx)))) VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg((((3333xxxx))))
-
-
-
- The VkDialogManager class takes care of all other details of posting
- the dialog, caching the dialog, etc.
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg(((())))
- VkGenericDialog(const char* name);
-
-
- The VkGenericDialog constructor simply calls the VkDialogManager
- constructor.
-
- ~~~~VVVVkkkkGGGGeeeennnneeeerrrriiiiccccDDDDiiiiaaaalllloooogggg(((())))
- virtual void ~VkGenericDialog(void);
-
-
- The VkGenericDialog destructor exists only to quiet the C++
- compiler. The widgets are destroyed by the VkDialogManager
- destructor.
-
- IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkDDDDiiiiaaaallllooooggggMMMMaaaannnnaaaaggggeeeerrrr
- show(), hide(), className(), prepost() ok(), cancel(), apply(),
- setTitle(), setButtonLabels(), unpost(), unpostAll(),
- centerOnScreen(), lastPosted(), post(), postModal(), postBlocked(),
- postAndWait(), _action, _showOK, _showCancel, _showApply,
- _allowMultipleDialogs, _minimizeMultipleDialogs, prepostCallback,
-
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
- callCallbacks(), addCallback(),removeCallback(),
- removeAllCallbacks()
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
- installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
- afterRealizeHook(), setDefaultResources(), getResources(), name(),
- baseWidget() okToQuit(), _name, _baseWidget, _w, deleteCallback
-
-
- KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
- VkPrefDialog
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- VkDialogManager, VkComponent,
- _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
- _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-