[Glade-devel] Glade 3 notes
- From: damon karuna uklinux net (Damon Chaplin)
- Subject: [Glade-devel] Glade 3 notes
- Date: 19 Apr 2004 23:10:21 +0100
--=-6SblZDY3yI70l73CEZxe
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
To try to find my way around the Glade 3 code I've had a quick scan
through all the C files and written a few notes.
I've attached them here in case they are useful to anyone else.
Damon
--=-6SblZDY3yI70l73CEZxe
Content-Disposition: attachment; filename=glade3-notes.txt
Content-Type: text/plain; name=glade3-notes.txt; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Major Files Implementing The Glade 3 GUI
========================================
glade-project-window.c - GladeProjectWindow is a struct representing the
main window in Glade, with pointers to all the
other windows like the widget tree, palette and
clipboard.
glade-project-view.c - GladeProjectView is a GtkScrolledWindow subclass
containing a GtkTreeView and a GtkTreeStore.
It is used for the main project view and for the
widget tree.
glade-project.c - GladeProject is a GObject representing a project.
It contains a name, path, changed flag, list of
widgets, list of selected widgets, an undo stack,
and a hash of id allocators.
glade-editor.c - property editor.
glade_editor_load_widget() shows the properties of
the given GladeWidget in the editor.
glade-signal-editor.c - GladeSignalEditor is a struct containing information
for editing the signals page in the property editor.
It shows a tree view of signals.
glade-palette.c - the palette of widgets (a GtkVBox subclass).
glade_palette_append_catalog() adds new widgets.
Emits "toggled" when a button is toggled.
glade-menu-editor.c - a dialog for editing the items in menubars and
popup menus.
glade-keys-dialog.c - a GtkDialog for selecting accelerator keys.
Only used by menu editor at present.
glade-clipboard-view.c - a GtkWindow that contains a GtkTreeView and maintains
the GtkListStore model to go with it.
glade_clipboard_view_add()/remove() add/remove
GladeWidgets from it. (GladeClipboard calls these.)
glade-clipboard.c - GladeClipboard is a GObject that contains a list of
widgets, the currently selected widget, and a pointer
to the corresponding clipboard view.
glade_clipboard_add()/remove() add/remove
GladeWidgets.
glade-popup.c - handles the popup context menu for a given
GladeWidget* or GladePlaceholder*.
Major Files Implementing Representation And Manipulation of Widgets
===================================================================
glade-catalog.c - struct representing a group of widgets, typically
one page in the palette. Each catalog has a title
and a list of GladeWidgetClass*.
glade_catalog_load() loads one catalog given the
base filename, e.g. "gtk-base.xml". The catalogs
are installed in (see configure.in & config.h):
$prefix/share/$PACKAGE-$VERSION/catalogs
glade_catalog_load_all() loads all the catalogs
in glade-palette.xml.
glade-widget-class.c - GladeWidgetClass is a struct containing information
and functions to handle a particular widget class.
Has a list of GladePropertyClass for all properties
and all child packing properties.
Has optional custom functions to handle the widget.
glade-gtk.c - contains the custom functions needed to handle the
GTK+ widgets. There are several types of functions:
o Get/Set Properties functions.
o Post-Create functions which are called after
widgets are created to set them up to be used
within Glade.
o Replace-Child functions to remove a child widget
and insert a new one in its place.
o Fill Empty functions that add placeholders to
containers so they can be used in Glade.
o Get Internal Child functions, that return a pointer
to an internal child widget given its name.
o Get/Set Child Packing Properties functions.
glade-widget.c - GladeWidget is a struct containing information on
one widget in the interface.
Contains the class, name, and pointer to the actual
widget, and a list of GladeProperty for each property
and child packing property, and a hash of
GladeSignals.
glade-placeholder.c - a GtkWidget to represent placeholders in the GUI.
glade-property-class.c - GladePropertyClass is a struct containing information
about a property of a particular widget class.
It has a type, id, name, tooltip, a list of
GladeParameter, and optional get/set functions if
custom functions are necessary.
glade-property.c - GladeProperty is a struct containing information
about a property of a particular widget.
It has a pointer to the corresponding
GladePropertyClass, a pointer to the GladeWidget,
and a GValue.
glade-parameter.c - GladeParameter is a struct containing a key/value
pair of information about a GladeProperty, e.g. for
numeric properties there may be a minimum and maximum
value, or the property may be optional.
glade-command.c - Undo/Redo action infrastructure.
Contains glade_command_undo()/redo().
glade_command_set_property()/set_name()
glade_command_delete()/create()/cut()/paste().
These create subclasses of GladeCommand to handle
undo/redoing particular actions.
Minor Files
===========
glade-choice.c - handles "choice" properties, i.e. enums.
FIXME: should use GTK+ functions where available.
I'm not sure this is finished - I don't think it
could support custom choice properties yet.
Do we need to support custom choice properties?
glade-packing.c - functions to handle child packing properties, mainly
of GtkTable and GtkBox since these need special
handling. Currently not used.
glade-cursor.c - glade_cursor_set() can be called to set cursors on
windows. Only SELECTOR/ADD_WIDGET cursors for now.
glade-debug.c - sets up GLib log error handlers for debugging.
Just does a G_BREAKPOINT().
glade-id-allocator.c - allocates unique ID numbers for newly-created
widgets, e.g. 'label1', 'label2'.
glade-signal.c - GladeSignal is a struct containing information
about a signal handler, i.e. its name, handler,
and whether it should run after the class method.
glade-transform.c - contains GValue transformation functions, to convert
from strings to various types (I think).
I'm not sure how/where these are used yet.
glade-utils.c - various utility functions, including
glade_util_draw_nodes() - draws the selection handles
glade-xml-utils.c - utility functions for handling XML files.
main.c - contains main() function to initialize app.
parses command line, sets up debugging log handlers,
registers GValue transformation functions,
loads widget catalogs, creates project window,
opens projects if specified on command line, calls
gtk_main().
--=-6SblZDY3yI70l73CEZxe--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]