[tepl] InfoBar: add the TeplInfoBarLocation enum
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] InfoBar: add the TeplInfoBarLocation enum
- Date: Wed, 11 Nov 2020 12:11:50 +0000 (UTC)
commit a215471e093cbcb1853e52c46922f6594f69fc75
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Nov 11 09:31:42 2020 +0100
InfoBar: add the TeplInfoBarLocation enum
docs/reference/tepl-sections.txt | 3 +++
tepl/tepl-info-bar.c | 14 ++------------
tepl/tepl-info-bar.h | 26 ++++++++++++++++++++++++++
3 files changed, 31 insertions(+), 12 deletions(-)
---
diff --git a/docs/reference/tepl-sections.txt b/docs/reference/tepl-sections.txt
index 3ecc763..62f6865 100644
--- a/docs/reference/tepl-sections.txt
+++ b/docs/reference/tepl-sections.txt
@@ -235,6 +235,7 @@ tepl_gutter_renderer_folds_state_get_type
<SECTION>
<FILE>info-bar</FILE>
TeplInfoBar
+TeplInfoBarLocation
tepl_info_bar_new
tepl_info_bar_new_simple
tepl_info_bar_get_icon_from_message_type
@@ -259,6 +260,8 @@ TEPL_TYPE_INFO_BAR
TeplInfoBarClass
TeplInfoBarPrivate
tepl_info_bar_get_type
+TEPL_TYPE_INFO_BAR_LOCATION
+tepl_info_bar_location_get_type
</SECTION>
<SECTION>
diff --git a/tepl/tepl-info-bar.c b/tepl/tepl-info-bar.c
index f04fae4..062ba87 100644
--- a/tepl/tepl-info-bar.c
+++ b/tepl/tepl-info-bar.c
@@ -11,19 +11,9 @@
*
* #TeplInfoBar is a subclass of #GtkInfoBar. In most cases it permits to create
* #GtkInfoBar's more easily.
- */
-
-/* To put later in the class description / the goal:
*
- * The content area of a #TeplInfoBar contains a vertical container containing:
- * - First, an horizontal container containing:
- * - A place for an optional icon.
- * - A vertical container that can contain: primary/secondary messages plus
- * additional widgets, in the order that they are added. So the widgets
- * added here are <emphasis>on the right</emphasis> of the icon.
- * - Possible additional widgets, in the order that they are added. So the
- * widgets added here are <emphasis>under</emphasis> the icon (if there is an
- * icon).
+ * The content area is divided into several sub-areas, described in
+ * #TeplInfoBarLocation.
*/
struct _TeplInfoBarPrivate
diff --git a/tepl/tepl-info-bar.h b/tepl/tepl-info-bar.h
index 9aea1ae..147d948 100644
--- a/tepl/tepl-info-bar.h
+++ b/tepl/tepl-info-bar.h
@@ -39,6 +39,32 @@ struct _TeplInfoBarClass
gpointer padding[12];
};
+/**
+ * TeplInfoBarLocation:
+ * @TEPL_INFO_BAR_LOCATION_ALONGSIDE_ICON: on the right side of the icon.
+ * @TEPL_INFO_BAR_LOCATION_BELOW_ICON: below the icon.
+ *
+ * Location inside the content area.
+ *
+ * The content area of a #TeplInfoBar contains a vertical container containing:
+ * - First, an horizontal container containing:
+ * - A place for an optional icon.
+ * - The %TEPL_INFO_BAR_LOCATION_ALONGSIDE_ICON location, which is a vertical
+ * container that can contain: primary/secondary messages plus additional
+ * widgets, in the order that they are added.
+ * - The %TEPL_INFO_BAR_LOCATION_BELOW_ICON location, which can contain
+ * additional widgets, in the order that they are added. So the widgets added
+ * here are under the icon and under the
+ * %TEPL_INFO_BAR_LOCATION_ALONGSIDE_ICON location.
+ *
+ * Since: 6.0
+ */
+typedef enum
+{
+ TEPL_INFO_BAR_LOCATION_ALONGSIDE_ICON,
+ TEPL_INFO_BAR_LOCATION_BELOW_ICON
+} TeplInfoBarLocation;
+
_TEPL_EXTERN
GType tepl_info_bar_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]