added missing horizontal jumper icon
[dia.git] / lib / properties.h
blobecb25186d5b8c9a441280b08535e9f19d7948696
1 /* Dia -- a diagram creation/manipulation program -*- c -*-
2 * Copyright (C) 1998 Alexander Larsson
4 * Property system for dia objects/shapes.
5 * Copyright (C) 2000 James Henstridge
6 * Copyright (C) 2001 Cyrille Chepelov
7 * Major restructuration done in August 2001 by C. Chepelov
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef LIB_PROPERTIES_H
25 #define LIB_PROPERTIES_H
27 #ifndef WIDGET
28 #ifdef GTK_WIDGET
29 #define WIDGET GtkWidget
30 #else
31 #define WIDGET void
32 #endif
33 #endif
36 #ifdef HAVE_STDDEF_H
37 #include <stddef.h>
38 #endif
40 #include <glib.h>
41 #include "diatypes.h"
43 #include "geometry.h"
44 #include "arrows.h"
45 #include "color.h"
46 #include "font.h"
47 #include "object.h"
48 #include "dia_xml.h"
49 #include "intl.h"
50 #include "textattr.h"
53 typedef gboolean (*PropDescToPropPredicate)(const PropDescription *pdesc);
55 struct _PropWidgetAssoc {
56 Property *prop;
57 WIDGET *widget;
60 struct _PropDialog { /* This is to be treated as opaque ! */
61 WIDGET *widget; /* widget of self */
63 GPtrArray *props; /* of Property * */
64 GArray *prop_widgets; /* of PropWidgetAssoc. This is a "flat" listing of
65 properties and widgets (no nesting information is
66 kept here) */
67 Object *obj_copy; /* if !NULL, a copy of the object which can be used
68 as scratch. */
69 Object *orig_obj; /* The original object (do not touch !) */
71 GPtrArray *containers;
72 WIDGET *lastcont;
73 WIDGET *curtable;
74 guint currow;
77 struct _PropEventData {
78 PropDialog *dialog;
79 guint my_index; /* in dialog->propwidgets */
80 WIDGET *widget;
81 Property *self;
84 typedef gboolean (*PropEventHandler) (Object *obj, Property *prop);
86 struct _PropEventHandlerChain {
87 PropEventHandler handler;
88 PropEventHandlerChain *chain;
91 /* PropertyType operations : */
93 /* allocate a new, empty property. */
94 typedef Property * (*PropertyType_New) (const PropDescription *pdesc,
95 PropDescToPropPredicate reason);
96 /* free the property -- must skip NULL values. */
97 typedef void (* PropertyType_Free)(Property *prop);
98 /* Copy the data member of the property. -- must skip NULL values. */
99 typedef Property *(* PropertyType_Copy)(Property *src);
100 /* Create a widget capable of editing the property. Add it to the last container (or
101 add/remove container levels). */
102 typedef WIDGET *(* PropertyType_GetWidget)(Property *prop,
103 PropDialog *dialog);
105 /* Get the value of the property into the widget */
106 typedef void (* PropertyType_ResetWidget)(const Property *prop, WIDGET *widget);
107 /* Set the value of the property from the current value of the widget */
108 typedef void (* PropertyType_SetFromWidget)(Property *prop, WIDGET *widget);
109 /* load/save a property */
110 typedef void (*PropertyType_Load)(Property *prop, AttributeNode attr, DataNode data);
111 typedef void (*PropertyType_Save)(Property *prop, AttributeNode attr);
113 /* If a property descriptor can be merged with another
114 (DONT_MERGE has already been handled) */
115 typedef gboolean (*PropertyType_CanMerge)(const PropDescription *pd1,const PropDescription *pd2);
116 typedef void (*PropertyType_GetFromOffset)(const Property *prop,
117 void *base, guint offset, guint offset2);
118 typedef void (*PropertyType_SetFromOffset)(Property *prop,
119 void *base, guint offset, guint offset2);
122 struct _PropertyOps {
123 PropertyType_New new_prop;
124 PropertyType_Free free;
125 PropertyType_Copy copy;
126 PropertyType_Load load;
127 PropertyType_Save save;
128 PropertyType_GetWidget get_widget;
129 PropertyType_ResetWidget reset_widget;
130 PropertyType_SetFromWidget set_from_widget;
132 PropertyType_CanMerge can_merge;
134 PropertyType_GetFromOffset get_from_offset;
135 PropertyType_SetFromOffset set_from_offset;
138 typedef const gchar *PropertyType;
140 /* Basic types (can be used as building blocks) : */
141 #define PROP_TYPE_INVALID "invalid" /* InvalidProperty */
142 #define PROP_TYPE_NOOP "noop" /* NoopProperty */
143 #define PROP_TYPE_UNIMPLEMENTED "unimplemented" /* UnimplementedProperty */
145 /* Integral types : */
146 #define PROP_TYPE_CHAR "char" /* CharProperty */
147 #define PROP_TYPE_BOOL "bool" /* BoolProperty */
148 #define PROP_TYPE_INT "int" /* IntProperty */
149 #define PROP_TYPE_INTARRAY "intarray" /* IntarrayProperty */
150 #define PROP_TYPE_ENUM "enum" /* EnumProperty */
151 #define PROP_TYPE_ENUMARRAY "enumarray" /* EnumarrayProperty */
153 /* Text types : */
154 #define PROP_TYPE_MULTISTRING "multistring" /* StringProperty */
155 /* (same as STRING but with (gint)extra_data lines) */
156 #define PROP_TYPE_STRING "string" /* StringProperty */
157 #define PROP_TYPE_FILE "file" /* StringProperty */
158 #define PROP_TYPE_TEXT "text" /* can't be visible */ /* TextProperty */
159 #define PROP_TYPE_STRINGLIST "stringlist" /* can't be visible */ /* StringListProperty */
161 /* Geometric types : */
162 #define PROP_TYPE_REAL "real" /* RealProperty */
163 #define PROP_TYPE_POINT "point" /* PointProperty */
164 #define PROP_TYPE_POINTARRAY "pointarray" /* PointarrayProperty */
165 #define PROP_TYPE_BEZPOINT "bezpoint" /* BezPointProperty */
166 #define PROP_TYPE_BEZPOINTARRAY "bezpointarray" /* BezPointarrayProperty */
167 #define PROP_TYPE_RECT "rect" /* RectProperty */
168 #define PROP_TYPE_ENDPOINTS "endpoints" /* EndpointsProperty */
169 #define PROP_TYPE_CONNPOINT_LINE "connpoint_line" /* Connpoint_LineProperty */
171 /* Attribute types : */
172 #define PROP_TYPE_LINESTYLE "linestyle" /* LinestyleProperty */
173 #define PROP_TYPE_ARROW "arrow" /* ArrowProperty */
174 #define PROP_TYPE_COLOUR "colour" /* ColorProperty */
175 #define PROP_TYPE_FONT "font" /* FontProperty */
177 /* Widget types : */
178 #define PROP_TYPE_STATIC "static" /* StaticProperty */
179 /* (tooltip is used as a (potentially big) static label) */
180 #define PROP_TYPE_BUTTON "button" /* ButtonProperty */
181 /* (tooltip is the button's label. Put an empty description). */
182 #define PROP_TYPE_NOTEBOOK_BEGIN "nb_begin" /* NotebookProperty */
183 #define PROP_TYPE_NOTEBOOK_END "nb_end" /* NotebookProperty */
184 #define PROP_TYPE_NOTEBOOK_PAGE "nb_page" /* NotebookProperty */
185 #define PROP_TYPE_MULTICOL_BEGIN "mc_begin" /* MulticolProperty */
186 #define PROP_TYPE_MULTICOL_END "mc_end" /* MulticolProperty */
187 #define PROP_TYPE_MULTICOL_COLUMN "mc_col" /* MulticolProperty */
188 #define PROP_TYPE_FRAME_BEGIN "f_begin" /* FrameProperty */
189 #define PROP_TYPE_FRAME_END "f_end" /* FrameProperty */
190 #define PROP_TYPE_LIST "list" /* ListProperty */
191 /* (offset is a GPtrArray of (const gchar *). offset2 is a gint, index of the
192 active item, -1 if none active.) */
194 /* Special types : */
195 #define PROP_TYPE_SARRAY "sarray" /* ArrayProperty */
196 #define PROP_TYPE_DARRAY "darray" /* ArrayProperty */
198 /* **************************************************************** */
200 struct _PropDescription {
201 const gchar *name;
202 PropertyType type;
203 guint flags;
204 const gchar *description;
205 const gchar *tooltip;
207 /* Holds some extra data whose meaning is dependent on the property type.
208 * For example, int or float may use bounds for a spin button, and enums
209 * may use a list of string names for enumeration values. */
210 gpointer extra_data;
212 /* if the property widget can send events when it's somehow interacted with,
213 control will be passed to object_type-supplied event_handler, and
214 event->dialog->obj_copy will be current with the dialog's values.
215 When control comes back, event->dialog->obj_copy's properties will be
216 brought back into the dialog. */
217 PropEventHandler event_handler;
219 GQuark quark; /* quark for property name -- helps speed up lookups. */
220 GQuark type_quark;
222 /* only used by dynamically constructed property descriptors (eg. groups) */
223 PropEventHandlerChain chain_handler;
225 const PropertyOps *ops;
228 #define PROP_FLAG_VISIBLE 0x0001
229 #define PROP_FLAG_DONT_SAVE 0x0002
230 #define PROP_FLAG_DONT_MERGE 0x0004 /* in case group properties are edited */
231 #define PROP_FLAG_NO_DEFAULTS 0x0008 /* don't edit this in defaults dlg. */
232 #define PROP_FLAG_LOAD_ONLY 0x0010 /* for loading old formats */
233 #define PROP_FLAG_STANDARD 0x0020 /* One of the default toolbox props */
234 #define PROP_FLAG_MULTIVALUE 0x0040 /* Multiple values for prop in group */
236 #define PROP_DESC_END { NULL, 0, 0, NULL, NULL, NULL, 0 }
238 /* extra data pointers for various property types */
239 struct _PropNumData {
240 gfloat min, max, step;
242 struct _PropEnumData {
243 const gchar *name;
244 guint enumv;
247 typedef gpointer (*NewRecordFunc)(void);
248 typedef void (*FreeRecordFunc)(gpointer rec);
250 struct _PropDescCommonArrayExtra { /* don't use this directly.
251 Use one of below */
252 PropDescription *record;
253 const gchar *composite_type; /* can be NULL. */
256 struct _PropDescDArrayExtra {
257 PropDescCommonArrayExtra common; /* must be first */
258 NewRecordFunc newrec;
259 FreeRecordFunc freerec;
262 struct _PropDescSArrayExtra {
263 PropDescCommonArrayExtra common; /* must be first */
264 guint element_size; /* sizeof(record) */
265 guint array_len;
269 /* ******************* */
270 /* The Property itself */
271 /* ******************* */
272 struct _Property {
273 const gchar *name;
274 GQuark name_quark;
275 PropertyType type;
276 GQuark type_quark;
277 const PropDescription *descr;
278 gpointer extra_data;
279 PropEventData self;
280 PropEventHandler event_handler;
281 PropDescToPropPredicate reason; /* why has this property been created from
282 the pdesc ? */
283 guint experience; /* flags PXP_.... */
285 const PropertyOps *ops; /* points to common_prop_ops */
286 const PropertyOps *real_ops; /* == descr->ops */
289 /* prop->experience flags */
290 #define PXP_COPIED 0x00000001 /* has been copied */
291 #define PXP_COPY 0x00000002 /* is a copy */
292 #define PXP_GET_WIDGET 0x00000004
293 #define PXP_RESET_WIDGET 0x00000008
294 #define PXP_SET_FROM_WIDGET 0x00000010
295 #define PXP_LOADED 0x00000020
296 #define PXP_SAVED 0x00000040
297 #define PXP_GFO 0x00000080
298 #define PXP_SFO 0x00000100
299 #define PXP_SHAMELESS 0xFFFFFFFF
301 /* ***************************************************************** */
302 /* Operations on property descriptors and property descriptor lists. */
304 void prop_desc_list_calculate_quarks(PropDescription *plist);
305 /* plist must have all quarks calculated in advance */
306 const PropDescription *prop_desc_list_find_prop(const PropDescription *plist,
307 const gchar *name);
308 /* finds the real handler in case there are several levels of indirection */
309 PropEventHandler prop_desc_find_real_handler(const PropDescription *pdesc);
310 /* free a handler indirection list */
311 void prop_desc_free_handler_chain(PropDescription *pdesc);
312 /* free a handler indirection list in a list of descriptors */
313 void prop_desc_list_free_handler_chain(PropDescription *pdesc);
314 /* insert an event handler */
315 void prop_desc_insert_handler(PropDescription *pdesc,
316 PropEventHandler handler);
318 /* operations on lists of property description lists */
319 PropDescription *prop_desc_lists_union(GList *plists);
320 PropDescription *prop_desc_lists_intersection(GList *plists);
323 /* ********************************************* */
324 /* Functions for dealing with the Type Registry */
325 void prop_type_register(PropertyType type, const PropertyOps *ops);
326 const PropertyOps *prop_type_get_ops(PropertyType type);
328 /* *********************************************************** */
329 /* functions for manipulating a property array. */
331 void prop_list_free(GPtrArray *plist);
334 /* copies the whole property structure, including the data. */
335 GPtrArray *prop_list_copy(GPtrArray *plist);
336 /* copies the whole property structure, excluding the data. */
337 GPtrArray *prop_list_copy_empty(GPtrArray *plist);
338 /* Appends copies of the properties in the second list to the first. */
339 void prop_list_add_list (GPtrArray *props, const GPtrArray *ptoadd);
341 GPtrArray *prop_list_from_descs(const PropDescription *plist,
342 PropDescToPropPredicate pred);
344 GPtrArray *prop_list_from_single(Property *prop);
346 /* Some predicates: */
347 gboolean pdtpp_true(const PropDescription *pdesc); /* always true */
348 gboolean pdtpp_is_visible(const PropDescription *pdesc);
349 gboolean pdtpp_is_visible_no_standard(const PropDescription *pdesc);
350 gboolean pdtpp_is_not_visible(const PropDescription *pdesc);
351 gboolean pdtpp_do_save(const PropDescription *pdesc);
352 gboolean pdtpp_do_save_no_standard(const PropDescription *pdesc);
353 gboolean pdtpp_do_load(const PropDescription *pdesc);
354 gboolean pdtpp_do_not_save(const PropDescription *pdesc);
355 /* all but DONT_MERGE and NO_DEFAULTS: */
356 gboolean pdtpp_defaults(const PropDescription *pdesc);
357 /* actually used for the "reason" parameter, not as predicates (synonyms for pdtpp_true) */
358 gboolean pdtpp_synthetic(const PropDescription *pdesc);
359 gboolean pdtpp_from_object(const PropDescription *pdesc);
362 /* Swallows the property into a single property list. Can be given NULL.
363 Don't free yourself the property afterwards; prop_list_free() the list
364 instead.
365 You regain responsibility for the property if you g_ptr_array_destroy() the
366 list. */
367 GPtrArray *prop_list_of_single(Property *prop);
369 /* Create a new property of the required type, with the required name.
370 A PropDescription might be created on the fly. The property's value is not
371 initialised (actually, it's zero). */
372 Property *make_new_prop(const char *name, PropertyType type, guint flags);
376 /* Offset to fields in objects */
378 /* calculates the offset of a structure member within the structure */
379 #ifndef offsetof
380 #define offsetof(type, member) ( (int) & ((type*)0) -> member )
381 #endif
382 struct _PropOffset {
383 const gchar *name;
384 PropertyType type;
385 int offset;
386 int offset2; /* maybe for point lists, etc */
387 GQuark name_quark;
388 GQuark type_quark;
389 const PropertyOps *ops;
392 /* ************************************************ */
393 /* routines used by Objects or to deal with Objects */
395 /* returns TRUE if this object can be handled (at least in part) through this
396 library. */
397 gboolean object_complies_with_stdprop(const Object *obj);
399 /* will do whatever is needed to make the PropDescription * list look good to
400 the rest of the properties code. Can return NULL. */
401 const PropDescription *object_get_prop_descriptions(const Object *obj);
403 gboolean object_get_props_from_offsets(Object *obj, PropOffset *offsets,
404 GPtrArray *props);
405 gboolean object_set_props_from_offsets(Object *obj, PropOffset *offsets,
406 GPtrArray *props);
408 /* apply some properties and return a corresponding object change */
409 ObjectChange *object_apply_props(Object *obj, GPtrArray *props);
411 /* standard properties dialogs that can be used for objects that
412 * implement describe_props, get_props and set_props.
413 * If is_default is set, this is a default dialog, not an object dialog.
415 WIDGET *object_create_props_dialog (Object *obj, gboolean is_default);
416 ObjectChange *object_apply_props_from_dialog (Object *obj, WIDGET *dialog);
418 /* create a property from the object's property descriptors. To be freed with
419 prop->ops->free(prop); or put it into a single property list. NULL if object
420 has nothing matching. Property's value is initialised by the object.
421 Serve cold. */
422 Property *object_prop_by_name(Object *obj, const char *name);
423 Property *object_prop_by_name_type(Object *obj, const char *name, const char *type);
425 /* standard way to load/save properties of an object */
426 void object_load_props(Object *obj, ObjectNode obj_node);
427 void object_save_props(Object *obj, ObjectNode obj_node);
429 /* standard way to copy the properties of an object into another (of the
430 same type) */
431 void object_copy_props(Object *dest, const Object *src,
432 gboolean is_default);
434 /* Return a reference to objects property with 'name' or NULL */
435 Property *object_get_prop_by_name (Object *obj, const char* name);
437 /* ************************************************************* */
439 void stdprops_init(void);
441 /* ************************************************************* */
443 /* standard properties. By using these, the intersection of the properties
444 * of a number of objects should be greater, making setting properties on
445 * groups better. */
447 /* HB: exporting the following two vars by GIMPVAR==dllexport/dllimport,
448 * does mean the pointers used below have to be calculated
449 * at run-time by the loader, because they will exist
450 * only once in the process space and dynamic link libraries may be
451 * relocated. As a result their address is no longer constant.
452 * Indeed it causes compile time errors with MSVC (initialzer
453 * not a constant).
454 * To fix it they are moved form properties.c and declared as static
455 * on Win32
457 #ifdef G_OS_WIN32
458 static PropNumData prop_std_line_width_data = { 0.0, 10.0, 0.01 };
459 static PropNumData prop_std_text_height_data = { 0.1, 10.0, 0.1 };
460 static PropEnumData prop_std_text_align_data[] = {
461 { N_("Left"), ALIGN_LEFT },
462 { N_("Center"), ALIGN_CENTER },
463 { N_("Right"), ALIGN_RIGHT },
464 { NULL, 0 }
466 #else
467 extern PropNumData prop_std_line_width_data, prop_std_text_height_data;
468 extern PropEnumData prop_std_text_align_data[];
469 #endif
471 #define PROP_STD_LINE_WIDTH \
472 { "line_width", PROP_TYPE_REAL, PROP_FLAG_VISIBLE|PROP_FLAG_STANDARD, \
473 N_("Line width"), NULL, &prop_std_line_width_data }
474 #define PROP_STD_LINE_COLOUR \
475 { "line_colour", PROP_TYPE_COLOUR, PROP_FLAG_VISIBLE|PROP_FLAG_STANDARD, \
476 N_("Line colour"), NULL, NULL }
477 #define PROP_STD_LINE_STYLE \
478 { "line_style", PROP_TYPE_LINESTYLE, PROP_FLAG_VISIBLE|PROP_FLAG_STANDARD, \
479 N_("Line style"), NULL, NULL }
481 #define PROP_STD_FILL_COLOUR \
482 { "fill_colour", PROP_TYPE_COLOUR, PROP_FLAG_VISIBLE|PROP_FLAG_STANDARD, \
483 N_("Fill colour"), NULL, NULL }
484 #define PROP_STD_SHOW_BACKGROUND \
485 { "show_background", PROP_TYPE_BOOL, PROP_FLAG_VISIBLE, \
486 N_("Draw background"), NULL, NULL }
488 #define PROP_STD_START_ARROW \
489 { "start_arrow", PROP_TYPE_ARROW, PROP_FLAG_VISIBLE|PROP_FLAG_STANDARD, \
490 N_("Start arrow"), NULL, NULL }
491 #define PROP_STD_END_ARROW \
492 { "end_arrow", PROP_TYPE_ARROW, PROP_FLAG_VISIBLE|PROP_FLAG_STANDARD, \
493 N_("End arrow"), NULL, NULL }
495 #define PROP_STD_TEXT \
496 { "text", PROP_TYPE_TEXT, PROP_FLAG_DONT_SAVE, \
497 N_("Text"), NULL, NULL }
498 #define PROP_STD_SAVED_TEXT \
499 { "text", PROP_TYPE_TEXT, 0, \
500 N_("Text"), NULL, NULL }
501 #define PROP_STD_TEXT_ALIGNMENT \
502 { "text_alignment", PROP_TYPE_ENUM, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
503 N_("Text alignment"), NULL, prop_std_text_align_data }
504 #define PROP_STD_TEXT_FONT \
505 { "text_font", PROP_TYPE_FONT, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
506 N_("Font"), NULL, NULL }
507 #define PROP_STD_TEXT_HEIGHT \
508 { "text_height", PROP_TYPE_REAL, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
509 N_("Font size"), NULL, &prop_std_text_height_data }
510 #define PROP_STD_TEXT_COLOUR \
511 { "text_colour", PROP_TYPE_COLOUR, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|PROP_FLAG_STANDARD, \
512 N_("Text colour"), NULL, NULL }
514 /* Convenience macros */
515 #define PROP_NOTEBOOK_BEGIN(name) \
516 { "nbook_" name, PROP_TYPE_NOTEBOOK_BEGIN, \
517 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
518 #define PROP_STD_NOTEBOOK_BEGIN PROP_NOTEBOOK_BEGIN("std")
519 #define PROP_OFFSET_NOTEBOOK_BEGIN(name) \
520 { "nbook_" name, PROP_TYPE_NOTEBOOK_BEGIN, 0}
521 #define PROP_OFFSET_STD_NOTEBOOK_BEGIN PROP_OFFSET_NOTEBOOK_BEGIN("std")
523 #define PROP_NOTEBOOK_END(name) \
524 { "nbook_" name "_end", PROP_TYPE_NOTEBOOK_END, \
525 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
526 #define PROP_STD_NOTEBOOK_END PROP_NOTEBOOK_END("std")
527 #define PROP_OFFSET_NOTEBOOK_END(name) \
528 { "nbook_" name "_end", PROP_TYPE_NOTEBOOK_END, 0}
529 #define PROP_OFFSET_STD_NOTEBOOK_END PROP_OFFSET_NOTEBOOK_END("std")
531 #define PROP_NOTEBOOK_PAGE(name,flags,descr) \
532 { "nbook_page_" name, PROP_TYPE_NOTEBOOK_PAGE, \
533 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|flags,descr,NULL}
534 #define PROP_OFFSET_NOTEBOOK_PAGE(name) \
535 { "nbook_page_" name , PROP_TYPE_NOTEBOOK_PAGE, 0}
537 #define PROP_MULTICOL_BEGIN(name) \
538 { "mcol_" name, PROP_TYPE_MULTICOL_BEGIN, \
539 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
540 #define PROP_STD_MULTICOL_BEGIN PROP_MULTICOL_BEGIN("std")
541 #define PROP_OFFSET_MULTICOL_BEGIN(name) \
542 { "mcol_" name, PROP_TYPE_NOTEBOOK_BEGIN, 0}
543 #define PROP_OFFSET_STD_MULTICOL_BEGIN PROP_OFFSET_MULTICOL_BEGIN("std")
545 #define PROP_MULTICOL_END(name) \
546 { "mcol_" name "_end", PROP_TYPE_MULTICOL_END, \
547 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
548 #define PROP_STD_MULTICOL_END PROP_MULTICOL_END("std")
549 #define PROP_OFFSET_MULTICOL_END(name) \
550 { "mcol_" name "_end", PROP_TYPE_NOTEBOOK_END, 0}
551 #define PROP_OFFSET_STD_MULTICOL_END PROP_OFFSET_MULTICOL_END("std")
553 #define PROP_MULTICOL_COLUMN(name) \
554 { "mcol_col_" name, PROP_TYPE_MULTICOL_COLUMN, \
555 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE,NULL,NULL}
556 #define PROP_OFFSET_MULTICOL_COLUMN(name) \
557 { "mcol_col_" name, PROP_TYPE_MULTICOL_COLUMN, 0}
559 #define PROP_FRAME_BEGIN(name,flags,descr) \
560 { "frame_" name, PROP_TYPE_FRAME_BEGIN, \
561 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|flags, descr, NULL}
562 #define PROP_OFFSET_FRAME_BEGIN(name) \
563 { "frame_" name, PROP_TYPE_FRAME_BEGIN, 0}
565 #define PROP_FRAME_END(name,flags) \
566 { "frame_" name "_end", PROP_TYPE_FRAME_END, \
567 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|flags, NULL, NULL}
568 #define PROP_OFFSET_FRAME_END(name) \
569 { "frame_" name "_end", PROP_TYPE_FRAME_END, 0}
573 #endif