| 1 |
/* Copyright (C) 2009 The gtkmm Development Team |
| 2 |
* |
| 3 |
* This library is free software; you can redistribute it and/or |
| 4 |
* modify it under the terms of the GNU Lesser General Public |
| 5 |
* License as published by the Free Software Foundation; either |
| 6 |
* version 2.1 of the License, or (at your option) any later version. |
| 7 |
* |
| 8 |
* This library is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
* Lesser General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Lesser General Public |
| 14 |
* License along with this library; if not, see <https://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
#include <glibmm/interface.h> |
| 18 |
#include <gtkmm/enums.h> |
| 19 |
_DEFS(gtkmm,gtk) |
| 20 |
_PINCLUDE(glibmm/private/interface_p.h) |
| 21 |
|
| 22 |
#ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 23 |
extern "C" |
| 24 |
{ |
| 25 |
typedef struct _GtkOrientableIface GtkOrientableIface; |
| 26 |
} |
| 27 |
#endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 28 |
|
| 29 |
namespace Gtk |
| 30 |
{ |
| 31 |
|
| 32 |
/** This interface is implemented by all widgets that can be oriented |
| 33 |
* horizontally or vertically. Historically, such widgets have been realized as |
| 34 |
* subclasses of a common base class (e.g GtkBox/GtkHBox/GtkVBox and |
| 35 |
* GtkScale/GtkHScale/GtkVScale). GtkOrientable is more flexible in that it |
| 36 |
* allows the orientation to be changed at runtime, allowing the widgets to 'flip'. |
| 37 |
* |
| 38 |
* @newin{2,16} |
| 39 |
*/ |
| 40 |
class GTKMM_API Orientable : public Glib::Interface |
| 41 |
{ |
| 42 |
_CLASS_INTERFACE(Orientable, GtkOrientable, GTK_ORIENTABLE, GtkOrientableIface, , , GTKMM_API) |
| 43 |
|
| 44 |
public: |
| 45 |
_WRAP_METHOD(void set_orientation(Orientation orientation), gtk_orientable_set_orientation) |
| 46 |
_WRAP_METHOD(Orientation get_orientation() const, gtk_orientable_get_orientation) |
| 47 |
|
| 48 |
_WRAP_PROPERTY("orientation", Orientation) |
| 49 |
}; |
| 50 |
|
| 51 |
} // namespace Gtk |