#include "lib/lib.h"
#include <stdio.h>
#include "kernel/kernel.h"
#include <gtk/gtk.h>
#include "gui/main.h"
#include "gui/cmdmgr.h"
#include "scheme/glt_gui.h"
Data Structures | |
| struct | VrrKernelStore |
| The structure providing the mediator between GtkTreeView and our internal kernel structures. More... | |
| struct | VrrKernelStoreClass |
| A structure needed by the GTK object system. More... | |
Defines | |
| #define | GTK_TYPE_VRR_STORE (vrr_kernel_store_get_type()) |
| #define | VRR_KERNEL_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VRR_STORE, VrrKernelStore)) |
| #define | VRR_KERNEL_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_VRR_STORE, VrrKernelStoreClass)) |
| #define | VRR_IS_KERNEL_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_VRR_STORE)) |
| #define | VRR_IS_KERNEL_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_VRR_STORE)) |
| #define | VRR_KERNEL_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_VRR_STORE, VrrKernelStoreClass)) |
| #define | COMPARE_AND_UPDATE_CONTEXT(_name) |
| #define | WALK_AND_DO_ENCLOSED(_xxx, _what) |
| #define | VALID_ITER(iter, vrr_kernel_store) (iter && iter->user_data) |
| #define | SIGNAL_TOGGLE_CHILD(_index) |
Typedefs | |
| typedef VrrKernelStore | VrrKernelStore |
| typedef VrrKernelStoreClass | VrrKernelStoreClass |
Enumerations | |
| enum | vrr_kernel_store_columns { VSC_TITLE, VSC_TYPE, VSC_ADDRESS, VSC_BG_COLOR, VSC_MODIFIED, VSC_IS_CONTEXT, VSC_FILENAME, VSC_COUNT } |
Functions | |
| GType | vrr_kernel_store_get_type (void) |
| A function needed by the GTK object system. | |
| VrrKernelStore * | vrr_kernel_store_new (void) |
| Creates a new VrrKernelStore. | |
| void | vrr_kernel_store_object_changed (VrrKernelStore *store, struct o *o) |
| Emits a GTK signal to let other widgets know that the patricular object changed. | |
| void | vrr_kernel_store_object_deleted (VrrKernelStore *store, struct o *father, int son_number) |
| Emits a GTK signal to let other widgets know that the patricular object was deleted. | |
| void | vrr_kernel_store_object_new (VrrKernelStore *store, struct o *o) |
| Emits a GTK signal to let other widgets know that the patricular object was added. | |
| void | vrr_kernel_store_gos_reordered (VrrKernelStore *store, struct go_group *parent, struct go *go, struct go *old_prev) |
| Emits a GTK signal that the some gos inside group parent changed their positions. | |
| int | go_has_child (struct go *go) |
| void | ub_obj_changed (struct o *o, struct obj_hook *hook UNUSED) |
| A hook callback, handles selection events and property changes - refreshes the object in the view. | |
| void | ub_obj_after_delete (struct o *o, struct o *father, struct o *prev, struct obj_hook *hook UNUSED) |
| A hook callback, removes the object from the view. | |
| void | ub_obj_added (struct o *o, struct obj_hook *hook UNUSED) |
| A hook callback, adds the object to the view. | |
| void | ub_go_changed (struct o *o, struct go_hook *hook UNUSED) |
| A hook callback, handles selection events and property changes - refreshes the object in the view. | |
| void | ub_go_after_delete (struct o *o, struct o *owner, struct o *prev, struct go_hook *hook UNUSED) |
| A hook callback, removes the object from the view. | |
| void | ub_go_added (struct o *o, struct go_hook *hook UNUSED) |
| A hook callback, adds the object to the view. | |
| void | ub_go_relink (struct o *o, struct go_group *old_group, struct go *prev, struct go_hook *h UNUSED) |
| A hook callback, removes the object and adds in a new place. | |
| void | ub_uh_item_delete (struct obj_page *page, struct undo_gui *ug, struct undo_gui *prev_item, struct trans_hook *h) |
| A callback for undo history item changes. | |
| void | ub_uh_item_new_change (struct obj_page *page, struct undo_gui *ug, struct trans_hook *h) |
| A callback for undo history item changes. | |
| void | ub_uh_item_undo_redo (struct obj_page *page, struct trans_hook *h) |
| A callback for undo history item changes. | |
| void | ub_uh_saved (struct obj *obj, struct trans_hook *h) |
| A callback for changed of the saved state. | |
| gboolean | on_button_press (GtkTreeView *tree_view, GdkEventButton *event, gpointer user_data) |
| gboolean | on_destroy_ub (GtkWindow *w UNUSED, gpointer data UNUSED) |
| void | create_universe_browser (void) |
| Create the Universe browser window. | |
| void | ub_refresh_menu (void) |
| Refresh the menu (and rebuild, if necessary. | |
| void | ub_go_after_delete (struct o *o UNUSED, struct o *owner, struct o *prev, struct go_hook *hook UNUSED) |
| void | ub_context_changed (struct context *old_context) |
| Show/hide the context icons where needed. | |
| void | modify_meta_selection (struct obj *obj, GdkEventButton *event) |
| (Un)selects the obj according to the keys pressed (passed in the event. | |
| void | modify_selection (struct go *volatile go, struct obj_page *page, GdkEventButton *event, struct geom_rectangle *rect, struct go_group *group) |
| void | vrr_kernel_store_init (VrrKernelStore *vrr_kernel_store) |
| Initialization in the GTK object system. | |
| void | vrr_kernel_store_class_init (VrrKernelStoreClass *vrr_kernel_store_class) |
| Initialization in the GTK object system. | |
| void | vrr_kernel_store_tree_model_init (GtkTreeModelIface *iface) |
| Initialization in the GTK object system. | |
| void | vrr_kernel_store_finalize (GObject *object) |
| Finalization in the GTK object system. | |
| void | vrr_kernel_store_drag_source_init (GtkTreeDragSourceIface *iface) |
| Initialization of the DND interface. | |
| void | vrr_kernel_store_drag_dest_init (GtkTreeDragDestIface *iface) |
| Initialization of the DND interface. | |
| GtkTreeModelFlags | vrr_kernel_store_get_flags (GtkTreeModel *tree_model) |
| gint | vrr_kernel_store_get_n_columns (GtkTreeModel *tree_model) |
| Returns the number of columns. | |
| GType | vrr_kernel_store_get_column_type (GtkTreeModel *tree_model, gint index) |
| gboolean | vrr_kernel_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path) |
| GtkTreePath * | vrr_kernel_store_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter) |
| void | vrr_kernel_store_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, gint column, GValue *value) |
| gboolean | vrr_kernel_store_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter) |
| gboolean | vrr_kernel_store_iter_children (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent) |
| gboolean | vrr_kernel_store_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter) |
| gint | vrr_kernel_store_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) |
| gboolean | vrr_kernel_store_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, gint n) |
| gboolean | vrr_kernel_store_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child) |
| Fills the iter data with the pointer to the parent object. | |
| gboolean | vrr_kernel_store_drag_get (GtkTreeDragSource *drag_source, GtkTreePath *path, GtkSelectionData *selection_data) |
| Fills the selection data with the chosen row to be dragged. | |
| gboolean | vrr_kernel_store_drag_delete (GtkTreeDragSource *drag_source, GtkTreePath *path) |
| gboolean | vrr_kernel_store_drag_received (GtkTreeDragDest *drag_dest, GtkTreePath *dest, GtkSelectionData *selection_data) |
| Inserts the given row before dest, if possible. | |
| gboolean | vrr_kernel_store_row_drop_possible (GtkTreeDragDest *drag_dest, GtkTreePath *dest_path, GtkSelectionData *selection_data) |
| Indicates wheather the currently dragged row can be dropped in the particular place. | |
| o * | o_get_gui_ancestor (struct o *o) |
| For an obj, returns his father obj. | |
| void | ub_refresh_modified_icon (struct obj_page *page) |
| void | ub_uh_item_delete (struct obj_page *page, struct undo_gui *ug UNUSED, struct undo_gui *prev_item UNUSED, struct trans_hook *h UNUSED) |
| void | ub_uh_item_new_change (struct obj_page *page, struct undo_gui *ug UNUSED, struct trans_hook *h UNUSED) |
| void | ub_uh_item_undo_redo (struct obj_page *page, struct trans_hook *h UNUSED) |
| void | ub_uh_saved (struct obj *obj, struct trans_hook *h UNUSED) |
| A callback for changed of the saved state. | |
| gboolean | vrr_kernel_store_drag_delete (GtkTreeDragSource *drag_source, GtkTreePath *path UNUSED) |
| Deletes the selection data previously filled for the chosen path. | |
| gboolean | check_drop (GtkTreeDragDest *drag_dest, GtkTreePath *dest, GtkSelectionData *selection_data, struct o **_ancestor, struct o **_child) |
Variables | |
| GType | column_types [] |
| wnd_univ_browser | wnd_univ_browser |
| The one and the only instance of the Universe browser window,. | |
| trans_hook | uth |
| GObjectClass * | parent_class = NULL |
|
|
Value: if (context._name != old_context->_name) { \ o = (struct o*)context._name; \ if (o && o_is_linked(o)) vrr_kernel_store_object_changed(wnd_univ_browser.tree_store, o ); \ o = (struct o*)old_context->_name; \ if (o && o_is_linked(o)) vrr_kernel_store_object_changed(wnd_univ_browser.tree_store, o ); \ } |
|
|
Value: { \
gtk_tree_path_append_index( path, (gint)_index ); \
iter.user_data = (gpointer)go3; \
DBG("** has-child of %p has changed\n", go3 ); \
gtk_tree_model_row_has_child_toggled( GTK_TREE_MODEL(store), path, &iter ); \
gtk_tree_path_up( path ); \
}
|
|
|
Value: if ( rect ) \ { \ ASSERT(group); \ PAGE_RECT_ENCLOSE_QUERY_BEGIN( _xxx, page, rect, gg ) \ if ((grp = go_get_owner_and_member(gg, group))) \ { \ if(grp->type != GOT_GROUP) \ _what(grp); \ else \ if(geom_rectangle_is_in(group_get_rtree_bbox(go2group(grp)), rect)) \ _what(grp); \ } \ PAGE_RECT_ENCLOSE_QUERY_END(_xxx); \ } else { \ ASSERT(go); \ if (group && (go = go_get_owner_and_member(go, group))) \ _what(go); \ } |
|
|
Create the Universe browser window. The window data structure is the global wnd_univ_browser. |
|
|
For an obj, returns his father obj. For a go in a top level group, returns the page. For other gos, returns their father group. |
|
||||||||||||||||
|
Fills the iter data with the pointer to the parent object. If the parent object is a top level group, sets the pointer to point to parent page instead. |
|
|
Initial value: { G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING }
|
1.3.5