source: trunk/desktop/idl/wpfolderwindow.idl

Last change on this file was 291, checked in by cinc, 19 years ago

Migrated to new IDL compiler. Metaclasses are still missing.

File size: 5.2 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2* Version: CDDL 1.0/LGPL 2.1
3*
4* The contents of this file are subject to the COMMON DEVELOPMENT AND
5* DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
6* this file except in compliance with the License. You may obtain a copy of
7* the License at http://www.sun.com/cddl/
8*
9* Software distributed under the License is distributed on an "AS IS" basis,
10* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11* for the specific language governing rights and limitations under the
12* License.
13*
14* The Original Code is "NOM" Netlabs Object Model
15*
16* The Initial Developer of the Original Code is
17* netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>.
18* Portions created by the Initial Developer are Copyright (C) 2005-2006
19* the Initial Developer. All Rights Reserved.
20*
21* Contributor(s):
22*
23* Alternatively, the contents of this file may be used under the terms of
24* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
25* case the provisions of the LGPL are applicable instead of those above. If
26* you wish to allow use of your version of this file only under the terms of
27* the LGPL, and not to allow others to use your version of this file under
28* the terms of the CDDL, indicate your decision by deleting the provisions
29* above and replace them with the notice and other provisions required by the
30* LGPL. If you do not delete the provisions above, a recipient may use your
31* version of this file under the terms of any one of the CDDL or the LGPL.
32*
33* ***** END LICENSE BLOCK ***** */
34
35/** \file
36
37*/
38
39#ifndef WPFLDRWINDOW_IDL_INCLUDED
40#define WPFLDRWINDOW_IDL_INCLUDED
41
42#ifdef __NOM_IDL_COMPILER__
43interface WPObject;
44#else
45
46/* FIXME: this is an ugly hack to prevent inclusion of the
47 wpnotebook.idl file in wpobject.idl which is included
48 from wpwindow.idl. wpnotebook doesn't find the WPWindow
49 class because it's defined later. This inclusion mess must be
50 cleaned up.*/
51#ifndef WPNOTEBOOK_IDL_INCLUDED
52#define WPNOTEBOOK_IDL_INCLUDED
53native PWPNoteBook;
54#endif
55#endif
56
57#include <nomobj.idl>
58
59NOMCLASSNAME(WPFolderWindow);
60
61#include "wpwindow.idl"
62
63/** \interface WPFolderWindow
64
65 Default desktop window used by folders to show objects to the user.
66 It's essential that the WPFolder owning the WPFolderWindow is set
67 into the instance variable by using wpSetObject() a method inherited
68 from WPWindow.
69
70 This class can be used as a base class for window classes which will
71 be used for folder windows. When creating a new class override nomInit()
72 and create your window. Be sure to have at least one container window as
73 a child of the toplevel window which will hold the folders objects. Save
74 the handle to this container using wpSetContainerHandle(). Default drag and
75 drop behaviour for desktop objects can easily be added by calling
76 wpConnectDefaultSignalHandlers() with the created container handle.
77
78 There is no limitation on the number of containers held by the toplevel
79 window. Each of these containers can be drag and drop enabled for desktop
80 objects.
81
82
83 */
84interface WPFolderWindow : WPWindow
85{
86#ifdef __NOM_IDL_COMPILER__
87 filestem=wpfolderwindow;
88#endif
89 NOMCLASSVERSION(1, 0);
90
91 /**
92 Query the handle to the container holding the objects.
93
94 \par How to override:
95 This method is usually not overriden.
96
97 \sa wpSetContainerHandle()
98 */
99 PGtkWidget wpQueryContainerHandle();
100
101 /**
102 Set the container handle of this folder window into the instance variable.
103
104 \remarks Always use this method to save the handle to the folder container.
105 While it's possible to write to the instance variable from within nomInit()
106 (where the toplevel window is created with at least one container window as a
107 child), using this methods gives subclasses the chance to alter the container
108 by overriding this method.
109
110 \param pgWidget Handle to a container window (usually GtkIconView)
111
112 \sa wpQueryContainerHandle()
113 */
114 void wpSetContainerHandle(in PGtkWidget pgWidget);
115
116 /**
117 Connect signal handlers with the given container which enable drag and drop
118 of desktop objects and context menus.
119
120 \remarks Using this method every container window (don't confuse that with GtkContainer)
121 can be enabled for drag and drop of desktop objects. Default context menu behaviour
122 known by desktop object will be enabled, too. There's no limit on the number
123 of containers in a folder window.
124
125 \par How to override:
126 This method can be overriden if additional signal handlers should be connected to the
127 container.
128
129 \param pgWidget Container window handle. This is for example an icon view.
130
131 \sa wpSetContainerHandle()
132 */
133 void wpConnectDefaultSignalHandlers(in PGtkWidget pgWidget);
134
135 /**
136 Override which creates a toplevel window with a container for icons.
137 */
138 NOMOVERRIDE(nomInit);
139
140 /**
141 This variable holds the container window handle (normaly a handle of a GtkIconView).
142
143 \sa wpSetContainerHandle(), wpQueryContainerHandle()
144 */
145 NOMINSTANCEVAR(PGtkWidget pgContainerHandle);
146};
147
148#endif /* WPFLDRWINDOW_IDL_INCLUDED */
149
150
151
152
153
154
Note: See TracBrowser for help on using the repository browser.