source: trunk/desktop/dox/examples/wpsetwpobject.c

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

Renamed wpSetWPObject()/wpQueryWPObject() of class WPWindow to wpSetObject()/wpQueryObject() for consistency.

File size: 1.9 KB
Line 
1/**
2 This method creates a folder window it doesn't query any files or creates
3 models and stuff.
4*/
5NOM_Scope PWPFolderWindow NOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev)
6{
7 WPFolderWindow * wpFldrWindow;
8 PPRIVFOLDERDATA priv;
9 WPFolderData *nomThis = WPFolderGetData(nomSelf);
10
11 priv=(PPRIVFOLDERDATA)_privFolderData;
12
13 /* Create a new folder window of class WPFolderWindow */
14 wpFldrWindow=WPFolderWindowNew();
15
16 /* Save a pointer to the desktop folder object */
17 WPFolderWindow_wpSetObject(wpFldrWindow, (WPObject*)nomSelf, NULLHANDLE);
18
19 /* Connect to the "item_activated" signal */
20 g_signal_connect (WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE), "item-activated",
21 G_CALLBACK (itemActivated), nomSelf);
22
23 WPFolderWindow_wpSetWindowTitle(wpFldrWindow, WPFolder_wpQueryTitle(nomSelf, NULLHANDLE), NULLHANDLE);
24
25 /* Prepare drag and drop */
26 gtk_drag_source_set(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE), GDK_BUTTON3_MASK, targetEntries, 1 ,
27 GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE);
28 gtk_drag_dest_set(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE), GTK_DEST_DEFAULT_ALL, targetEntries, 1 ,
29 GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE);
30 g_signal_connect(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE),"drag_data_received",
31 G_CALLBACK(fldrDragDataReceived), NULL);
32 g_signal_connect(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE),"drag_begin",
33 G_CALLBACK(fldrDragBegin), NULL);
34 g_signal_connect(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE),"drag_motion",
35 G_CALLBACK(fldrDragMotion), NULL);
36
37 /* Show the new window */
38 WPFolderWindow_show(wpFldrWindow, ev);
39
40 return wpFldrWindow;
41}
Note: See TracBrowser for help on using the repository browser.