File indexing completed on 2024-04-28 05:32:11

0001 #ifndef oxygengtkgap_h
0002 #define oxygengtkgap_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 <gtk/gtk.h>
0011 
0012 namespace Oxygen
0013 {
0014     namespace Gtk
0015     {
0016 
0017         //! stores 'gap' parameters, for convenience
0018         class Gap
0019         {
0020             public:
0021 
0022             //! constructor
0023             explicit Gap( void ):
0024                 _x(0),
0025                 _w(0),
0026                 _h( DefaultGapHeight ),
0027                 _position( GTK_POS_TOP )
0028             {}
0029 
0030             //! constructor
0031             Gap( gint x, gint w, GtkPositionType position ):
0032                 _x( x ),
0033                 _w( w ),
0034                 _h( DefaultGapHeight ),
0035                 _position( position )
0036             {}
0037 
0038             //!@name accessors
0039             //@{
0040 
0041             const gint& x( void ) const { return _x; }
0042             const gint& width( void ) const { return _w; }
0043             const gint& height( void ) const { return _h; }
0044             const GtkPositionType& position( void ) const { return _position; }
0045 
0046             //@}
0047 
0048             //!@name modifiers
0049             //@{
0050 
0051             void setX( gint value ) { _x = value; }
0052             void setWidth( gint value) { _w = value; }
0053             void setHeight( gint value ) { _h = value; }
0054 
0055             //@}
0056 
0057             private:
0058 
0059             enum { DefaultGapHeight = 4 };
0060 
0061             gint _x;
0062             gint _w;
0063             gint _h;
0064             GtkPositionType _position;
0065 
0066 
0067 
0068         };
0069 
0070     }
0071 
0072 }
0073 #endif