1 #ifndef oxygenpaneddata_h 2 #define oxygenpaneddata_h 3 /* 4 * this file is part of the oxygen gtk engine 5 * Copyright (c) 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or(at your option ) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 20 * MA 02110-1301, USA. 21 */ 22 23 #include "oxygensignal.h" 24 25 #include <gtk/gtk.h> 26 27 namespace Oxygen 28 { 29 class PanedData 30 { 31 32 public: 33 34 //! constructor PanedData(void)35 PanedData( void ): 36 _cursorLoaded( false ), 37 _cursor( 0L ) 38 {} 39 40 //! destructor ~PanedData(void)41 virtual ~PanedData( void ) 42 { 43 disconnect( 0L ); 44 if( _cursor ) gdk_cursor_unref( _cursor ); 45 } 46 47 //! setup connections 48 void connect( GtkWidget* ); 49 50 //! disconnect 51 void disconnect( GtkWidget* ); 52 53 protected: 54 55 //! update cursor 56 virtual void updateCursor( GtkWidget* ); 57 58 //! realization hook 59 static void realizeEvent( GtkWidget*, gpointer ); 60 61 private: 62 63 //! realization signal 64 Signal _realizeId; 65 66 //! cursor 67 bool _cursorLoaded; 68 GdkCursor* _cursor; 69 70 }; 71 72 } 73 74 #endif 75