GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

dnd.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_GDK_DND_HH 00025 #define GFC_GDK_DND_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_GDK_TYPES_HH 00032 #include <gfc/gdk/types.hh> 00033 #endif 00034 00035 #ifndef _CPP_VECTOR 00036 #include <vector> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Gdk { 00042 00043 class Display; 00044 class Screen; 00045 class Window; 00046 00056 00057 class DragContext : public G::Object 00058 { 00059 friend class G::Object; 00060 00061 DragContext(const DragContext&); 00062 DragContext& operator=(const DragContext&); 00063 00064 protected: 00067 00068 DragContext(); 00070 00071 explicit DragContext(GdkDragContext *drag_context, bool owns_reference = true); 00078 00080 00081 public: 00084 00085 virtual ~DragContext(); 00087 00089 00090 static Pointer<DragContext> drag_begin(const Window& window, const std::vector<Atom>& targets); 00097 00098 static unsigned int drag_get_protocol(unsigned int xid, DragProtocol *protocol, const Display *display = 0); 00107 00110 00111 GdkDragContext* gdk_drag_context() const; 00113 00114 operator GdkDragContext* () const; 00116 00117 DragProtocol protocol() const; 00119 00120 bool is_source() const; 00122 00123 Window* source_window() const; 00125 00126 Window* dest_window() const; 00128 00129 bool targets(std::vector<Atom>& target_list) const; 00133 00134 DragActionField actions() const; 00136 00137 DragActionField suggested_action() const; 00139 00140 DragActionField action() const; 00142 00143 unsigned int start_time() const; 00145 00146 Atom get_selection() const; 00149 00153 00154 void drag_status(DragActionField action, unsigned int time); 00162 00163 void drop_reply(bool ok, unsigned int time); 00170 00171 void drop_finish(bool success, unsigned int time); 00177 00178 void find_window(int x_root, int y_root, Window **dest_window, DragProtocol *protocol, const Screen *screen = 0); 00189 00190 bool drag_motion(const Window& dest_window, DragProtocol protocol, int x_root, int y_root, 00191 DragActionField suggested_action, DragActionField possible_actions, unsigned int time); 00203 00204 void drag_drop(unsigned int time); 00209 00210 void drag_abort(unsigned int time); 00215 00216 void set_action(DragActionField action); 00223 00225 }; 00226 00227 } // namespace Gdk 00228 00229 } // namespace GFC 00230 00231 #include <gfc/gdk/inline/dnd.inl> 00232 00233 #endif // GFC_GDK_DND_HH 00234

Generated on Tue Aug 24 00:34:30 2004 for GFC-UI by doxygen 1.3.8