summaryrefslogtreecommitdiff
path: root/src/gui/panels/panel-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels/panel-int.h')
-rw-r--r--src/gui/panels/panel-int.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/src/gui/panels/panel-int.h b/src/gui/panels/panel-int.h
index b3a9f10..e902722 100644
--- a/src/gui/panels/panel-int.h
+++ b/src/gui/panels/panel-int.h
@@ -29,8 +29,7 @@
#include "panel.h"
-#include <gtk/gtkbin.h>
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
#include "../editem-int.h"
@@ -45,10 +44,14 @@ struct _GPanelItem
DL_LIST_ITEM(link); /* Maillon de liste chaînée */
+ PanelItemPersonality personality; /* Nature de l'élément */
+
const char *lname; /* Description longue */
const char *path; /* Chemin vers la place idéale */
+ bool docked; /* Panneau inscrusté ? */
+
};
@@ -57,18 +60,25 @@ typedef struct _panel_node
{
struct _panel_node *parent; /* Noeud parent */
- char *path; /* Chemin du nom courant */
- size_t depth; /* Profondeur utilisée */
+ union
+ {
+ GtkWidget *widget; /* Accès généraliste */
+ GtkWidget *station; /* Station d'accueil simple */
+ GtkWidget *paned; /* Station d'accueil composée */
- bool simple; /* Noeud sans division */
+ };
union
{
- GtkWidget *station; /* Station d'accueil simple */
+ /* Version simple */
+ struct
+ {
+ char *path; /* Chemin du nom courant */
+ };
+ /* Version composée */
struct
{
- GtkWidget *paned; /* Station d'accueil composée */
struct _panel_node *first; /* Premier sous élément */
struct _panel_node *second; /* Second sous élément */
};
@@ -78,7 +88,16 @@ typedef struct _panel_node
} panel_node;
-#define GET_PANEL_NODE_WIDGET(node) (node->simple ? node->station : node->paned)
+
+#define IS_SIMPLE_NODE(nd) \
+ ({ \
+ bool __result; \
+ __result = GTK_IS_DOCK_STATION(nd->station); \
+ assert(__result || GTK_IS_PANED(nd->paned)); \
+ __result; \
+ })
+
+
/* Elément réactif pour panneaux de l'éditeur (classe) */
@@ -86,6 +105,9 @@ struct _GPanelItemClass
{
GEditorItemClass parent; /* A laisser en premier */
+ bool unique; /* Panneau instanciable ? */
+ const char *bindings; /* Raccourci clavier éventuel */
+
GtkBin *first; /* Elément racine */
};