1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2020 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef GSCHEM_DOCKABLE_H
22 #define GSCHEM_DOCKABLE_H
24 #define GSCHEM_TYPE_DOCKABLE_STATE (gschem_dockable_state_get_type ())
26 #define GSCHEM_TYPE_DOCKABLE (gschem_dockable_get_type ())
27 #define GSCHEM_DOCKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSCHEM_TYPE_DOCKABLE, GschemDockable))
28 #define GSCHEM_DOCKABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_DOCKABLE, GschemDockableClass))
29 #define GSCHEM_IS_DOCKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSCHEM_TYPE_DOCKABLE))
30 #define GSCHEM_DOCKABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_DOCKABLE, GschemDockableClass))
33 GSCHEM_DOCKABLE_STATE_HIDDEN
,
34 GSCHEM_DOCKABLE_STATE_DIALOG
,
35 GSCHEM_DOCKABLE_STATE_WINDOW
,
36 GSCHEM_DOCKABLE_STATE_DOCKED_LEFT
,
37 GSCHEM_DOCKABLE_STATE_DOCKED_BOTTOM
,
38 GSCHEM_DOCKABLE_STATE_DOCKED_RIGHT
39 } GschemDockableState
;
41 typedef struct _GschemDockableClass GschemDockableClass
;
42 typedef struct _GschemDockable GschemDockable
;
44 struct _GschemDockableClass
{
45 GObjectClass parent_class
;
47 GtkWidget
*(*create_widget
) (GschemDockable
*dockable
);
48 void (*post_present
) (GschemDockable
*dockable
);
49 void (*cancel
) (GschemDockable
*dockable
);
51 void (*save_internal_geometry
) (GschemDockable
*dockable
,
54 void (*restore_internal_geometry
) (GschemDockable
*dockable
,
59 struct _GschemDockable
{
60 GObject parent_instance
;
62 GschemToplevel
*w_current
;
65 gchar
*settings_name
, *group_name
;
69 GschemDockableState initial_state
;
70 gint initial_width
, initial_height
;
71 GtkWindowPosition initial_position
;
73 GtkWidget
*widget
, *window
, *vbox
, *action_area
;
74 GtkWidget
*hide_button
, *cancel_button
, *help_button
;
76 GtkWidget
*dock_left_item
, *dock_bottom_item
, *dock_right_item
;
77 GtkWidget
*menu
, *detach_item
, *move_left_item
, *move_bottom_item
,
78 *move_right_item
, *close_item
;
81 GType
gschem_dockable_state_get_type (void);
82 GType
gschem_dockable_get_type (void);
84 void gschem_dockable_hide (GschemDockable
*dockable
);
85 void gschem_dockable_detach (GschemDockable
*dockable
,
86 gboolean show_action_area
);
87 void gschem_dockable_attach_to_notebook (GschemDockable
*dockable
,
90 GschemDockableState
gschem_dockable_get_state (GschemDockable
*dockable
);
91 void gschem_dockable_set_state (GschemDockable
*dockable
,
92 GschemDockableState state
);
94 void gschem_dockable_present (GschemDockable
*dockable
);
97 void gschem_dockable_initialize_toplevel (GschemToplevel
*w_current
);
98 void gschem_dockable_cleanup_toplevel (GschemToplevel
*w_current
);
100 #endif /* GSCHEM_DOCKABLE_H */