Whole document tree
12.2. DescriptionThis is the GnomeMDI interface from Jaka Mocnik used in GHex and GTop. 12.2.1. gnome_mdi_new - create a new GnomeMDI object12.2.1.1. DescriptionThis function returns a new GnomeMDI object. It is normally only called once in main. Mode is set to the default mode (selected by the user in look-and-feel properties). 12.2.1.2. UsageGnomeMDI *mdi = gnome_mdi_new ("gtop", "GTop"); 12.2.1.3. Parameters
12.2.2. gnome_mdi_set_mode - set GnomeMDI mode12.2.2.1. DescriptionThis function sets the MDI mode to mode. When called without any views open, it simply opens a new toplevel window, otherwise it hides all views and re-shows them in the new mode. 12.2.2.2. Usagegnome_mdi_set_mode (mdi, GNOME_MDI_NOTEBOOK); 12.2.2.3. Parameters
12.2.3. gnome_mdi_set_tab_pos - set the position of the MDI notebook tabs12.2.3.1. DescriptionSet the position of the tabs of the notebook shown in GNOME_MDI_NOTEBOOK mode to tab_pos. 12.2.3.2. Usagegnome_mdi_set_tab_pos (mdi, GTK_POS_LEFT); 12.2.3.3. Parameters
12.2.4. gnome_mdi_set_menu_template - set the template for MDI menus12.2.4.1. DescriptionThis function sets the template for menus that appear in each toplevel window to menu_template. For each new toplevel window created by the MDI, this structure is copied, the menus are created with gnome_app_create_menus_with_data() function with mdi as the callback user data. Finally, the pointer to the copy is assigned to the new toplevel window (a GnomeApp widget) as data with key GNOME_MDI_MENUBAR_INFO_KEY. The copy of the template (and, most importantly, its widget members) can be accessed through the corresponding GnomeApp widget with the gtk_object_get_data() call: GnomeUIInfo *uiinfo; uiinfo = gtk_object_get_data(GTK_OBJECT(mdi->active_window), GNOME_MDI_MENUBAR_INFO_KEY); gtk_widget_set_sensitive(uiinfo[3].member, FALSE); 12.2.4.2. Usagegnome_mdi_set_menu_template(mdi, mdi_menubar); 12.2.4.3. Parameters
12.2.5. gnome_mdi_set_toolbar_template - set the template for MDI toolbar12.2.5.1. DescriptionThis function sets the template for toolbar that appears in each toplevel window to toolbar_template. For each new toplevel window created by the MDI, this structure is copied, the toolbar is created with gnome_app_create_toolbar_with_data() function with mdi as the callback user data. Finally, the pointer to the copy is assigned to the new toplevel window (a GnomeApp widget) as data with key GNOME_MDI_TOOLBAR_INFO_KEY. The copy of the template (and, most importantly, its widget members) can be accessed through the corresponding GnomeApp widget with the gtk_object_get_data() call: GnomeUIInfo *uiinfo; uiinfo = gtk_object_get_data(GTK_OBJECT(mdi->active_window), GNOME_MDI_TOOLBAR_INFO_KEY); gtk_widget_set_sensitive(uiinfo[3].member, FALSE); 12.2.5.2. Usagegnome_mdi_set_toolbar_template(mdi, mdi_toolbar); 12.2.5.3. Parameters
12.2.6. gnome_mdi_set_child_menu_path - sets the path for child-specific menus12.2.6.1. DescriptionSets the desired position of child-specific menus (which are re-added to each toplevel window when a new view is activated in it). See gnome_app_find_menu_pos for details on menu paths. 12.2.6.2. Usagegnome_mdi_set_child_menu_path(mdi, "File"); 12.2.6.3. Parameters
12.2.7. gnome_mdi_set_child_list_path - sets the menu path for the list of children12.2.7.1. DescriptionSets the position for insertion of menu items used to activate the MDI children that were added to the MDI. See gnome_app_find_menu_pos for details on menu paths. If the path is not set or set to NULL, these menu items aren't going to be inserted in the MDI menu structure. Note that if you want all menu items to be inserted in their own submenu, you have to create that submenu (and leave it empty, of course). 12.2.7.2. Usagegnome_mdi_set_child_list_path(mdi, "Children/"); 12.2.7.3. Parameters
12.2.8. gnome_mdi_add_view - adds a new view to the MDI12.2.8.1. DescriptionCreates a new view of the child and adds it to the MDI. GnomeMDIChild child has to be added to the MDI with a call to gnome_mdi_add_child before its views are added to the MDI. An "add_view" signal is emitted to the MDI after the view has been created, but before it is shown and added to the MDI, with a pointer to the created view as its parameter. The view is added to the MDI only if the signal handler (if it exists) returns TRUE. If the handler returns FALSE, the created view is destroyed and not added to the MDI. The function returns TRUE if the view has been added and FALSE otherwise. 12.2.8.2. Usagesuccess = gnome_mdi_add_view(mdi, child); 12.2.8.3. Parameters
12.2.9. gnome_mdi_add_toplevel_view - adds a new view to the MDI in a new toplevel window12.2.9.1. DescriptionCreates a new view of the child and adds it to the MDI; it behaves the same way as gnome_mdi_add_view in GNOME_MDI_MODAL and GNOME_MDI_TOPLEVEL modes, but opens in GNOME_MDI_NOTEBOOK mode, the view is added in a new toplevel window unless the active one has no views in it. The function returns TRUE if the view has been successfully added and FALSE otherwise. 12.2.9.2. Usagesuccess = gnome_mdi_add_toplevel_view(mdi, child); 12.2.9.3. Parameters
12.2.10. gnome_mdi_remove_view - removes an existing view from the MDI12.2.10.1. DescriptionRemoves a view from an MDI. A "remove_view" signal is emitted to the MDI before actually removing view. The view is removed only if the signal handler (if it exists and the force is set to FALSE) returns TRUE. The function returns TRUE if the view has been removed and FALSE otherwise. 12.2.10.2. Usagesuccess = gnome_mdi_remove_view(mdi, view, FALSE); 12.2.10.3. Parameters
12.2.11. gnome_mdi_active_view - returns a pointer to the last active view12.2.11.1. DescriptionReturns a pointer to the last active view (ie: the view that has last had the focus) or NULL if there is none. 12.2.11.2. Usageactive_view = gnome_mdi_active_view(mdi); 12.2.11.3. Parameters
12.2.12. gnome_mdi_set_active_view - sets the active view12.2.12.1. DescriptionSets the active view to view. 12.2.12.2. Usagegnome_mdi_set_active_view(mdi, view); 12.2.12.3. Parameters
12.2.13. gnome_mdi_add_child - adds a new child to an MDI12.2.13.1. DescriptionAdds a new child to the MDI. No views are added: this has to be done with a call to gnome_mdi_add_view. First an "add_child" signal is emitted to the MDI with a pointer to the child as its parameter. The child is added to the MDI only if the signal handler (if it exists) returns TRUE. If the handler returns FALSE, the child is not added to the MDI. The function returns TRUE if the child has been added and FALSE otherwise. 12.2.13.2. Usagesuccess = gnome_mdi_add_child(mdi, child); 12.2.13.3. Parameters
12.2.14. gnome_mdi_remove_child - removes a child from the MDI12.2.14.1. DescriptionRemoves a child and all of its views from the MDI. A "remove_child" signal is emitted to the MDI before actually removing the child. The child is removed only if the signal handler (if it exists and the force is set to FALSE) returns TRUE. The function returns TRUE if the child has been removed and FALSE otherwise. 12.2.14.2. Usagesuccess = gnome_mdi_remove_child(mdi, child, FALSE); 12.2.14.3. Parameters
12.2.15. gnome_mdi_remove_all - removes all children from the MDI12.2.15.1. DescriptionRemoves all children and all views from the MDI. A "remove_child" signal is emitted to the MDI for each child before actually trying to remove any. If signal handlers for all children (if they exist and the force is set to FALSE) return TRUE, all children and their views are removed and none otherwise. The function returns TRUE if all children have been removed and FALSE otherwise. 12.2.15.2. Usagesuccess = gnome_mdi_remove_all(mdi, FALSE); 12.2.15.3. Parameters
12.2.16. gnome_mdi_update_child - updates a child when its name changes12.2.16.1. DescriptionFor the time being all it does is update the child's name in the MDI. 12.2.16.2. Usagegnome_mdi_update_child(mdi, child); 12.2.16.3. Parameters
12.2.17. gnome_mdi_active_child - returns the active child12.2.17.1. DescriptionReturns the last active child (ie: the child a view of which has last had focus). 12.2.17.2. Usageactive_child = gnome_mdi_active_child(mdi); 12.2.17.3. Parameters
12.2.18. gnome_mdi_find_child - returns a named child12.2.18.1. DescriptionReturns the child named name. If no child with such name is found, NULL is returned. 12.2.18.2. Usagewanted_child = gnome_mdi_find_child(mdi, "Donald E."); 12.2.18.3. Parameters
12.2.19. gnome_mdi_open_toplevel - opens a new toplevel window12.2.19.1. DescriptionUnless the MDI is in GNOME_MDI_MODAL mode, a new toplevel window is created. In GNOME_MDI_MODAL mode the number of toplevel windows is constrained to a maximum of one. 12.2.19.2. Usagegnome_mdi_open_toplevel(mdi); 12.2.19.3. Parameters
12.2.20. gnome_mdi_register - registers a GtkObject with MDI12.2.20.1. DescriptionRegisters a GtkObject with MDI. This is mostly intended for applications that open other windows besides those opened by the MDI and want to continue to run even when no MDI windows exist (an example of this would be GIMP's window with tools, if the pictures were MDI children). As long as there is an object registered with the MDI, the MDI will not destroy itself when the last of its windows is closed. If no objects are registered, closing the last MDI window results in MDI being destroyed. 12.2.20.2. Usagegnome_mdi_register(mdi, tool_window); 12.2.20.3. Parameters
12.2.21. gnome_mdi_unregister - removes a GtkObject from the list of registered objects12.2.21.1. DescriptionRemoves a GtkObject from the list of registered objects. 12.2.21.2. Usagegnome_mdi_unregister(mdi, tool_window); 12.2.21.3. Parameters
12.2.22. gnome_mdi_get_app_from_view - retrieves a view's toplevel window12.2.22.1. DescriptionReturns a view's toplevel window. 12.2.22.2. Usageview_app = gnome_mdi_get_app_from_view(view); 12.2.22.3. Parameters
12.2.23. gnome_mdi_get_child_from_view - retrieves a view's child12.2.23.1. DescriptionReturns the child that view belongs to. 12.2.23.2. Usageview_child = gnome_mdi_get_child_from_view(view); 12.2.23.3. Parameters
12.2.24. gnome_mdi_get_view_from_window - retrieves a view from a certain window12.2.24.1. DescriptionReturns the view that resides in window app. If MDI mode is GNOME_MDI_NOTEBOOK, the view in the selected notebook page is returned. 12.2.24.2. Usageview = gnome_mdi_get_view_from_window(mdi, app); 12.2.24.3. Parameters
|