File indexing completed on 2024-05-12 05:34:35

0001 #ifndef oxygenpaneddata_h
0002 #define oxygenpaneddata_h
0003 /*
0004 * this file is part of the oxygen gtk engine
0005 * SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr>
0006 *
0007 * SPDX-License-Identifier: LGPL-2.0-or-later
0008 */
0009 
0010 #include "oxygensignal.h"
0011 
0012 #include <gtk/gtk.h>
0013 
0014 namespace Oxygen
0015 {
0016     class PanedData
0017     {
0018 
0019         public:
0020 
0021         //! constructor
0022         PanedData( void ):
0023             _cursorLoaded( false ),
0024             _cursor( 0L )
0025         {}
0026 
0027         //! destructor
0028         virtual ~PanedData( void )
0029         {
0030             disconnect( 0L );
0031             if( _cursor ) gdk_cursor_unref( _cursor );
0032         }
0033 
0034         //! setup connections
0035         void connect( GtkWidget* );
0036 
0037         //! disconnect
0038         void disconnect( GtkWidget* );
0039 
0040         protected:
0041 
0042         //! update cursor
0043         virtual void updateCursor( GtkWidget* );
0044 
0045         //! realization hook
0046         static void realizeEvent( GtkWidget*, gpointer );
0047 
0048         private:
0049 
0050         //! realization signal
0051         Signal _realizeId;
0052 
0053         //! cursor
0054         bool _cursorLoaded;
0055         GdkCursor* _cursor;
0056 
0057     };
0058 
0059 }
0060 
0061 #endif