home *** CD-ROM | disk | FTP | other *** search
- /*
- * Snippets of example code to accompany the Pane sublibrary
- * This example routine might be called when the user selects 'Options...' from
- * your menu.
- */
-
- #include "DeskLib:Pane.h"
-
-
- /* Global structure to hold pane data */
-
- static pane_data optionspanedata;
-
-
- static void MenuSel_Options()
- {
- window_handle main, pane;
- void *temp;
-
- main = Window_Create("Options", 0); /* Create windows */
- pane = Window_Create("OptionPane", 0); /* 'Options' probably has Save, */
- /* Cancel, Quit icons and a */
- /* lowered icon the size of */
- /* 'OptionsPane', which has all */
- /* the options details in it */
-
- Pane_InitData(main, pane, &optionspanedata); /* Initialise data */
- Pane_Open(optionspanedata); /* Open them both */
-
- temp = (void *)&optionspanedata; /* Just to make the next 2 lines
- neater */
-
- Event_Claim(event_OPEN, main, event_ANY, Pane_OpenEvent, temp);
-
- /* Only need to attach to main window
- although you can attach to both if you think
- that your program might close the pane. */
-
- Event_Claim(event_CLOSE, main, event_ANY, Pane_Delete, temp);
- }
-