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
29 #define WIDGET GtkWidget
35 typedef struct _PropDescription PropDescription
;
36 typedef struct _Property Property
;
37 typedef struct _PropEventData PropEventData
;
38 typedef struct _PropDialog PropDialog
;
39 typedef struct _PropEventHandlerChain PropEventHandlerChain
;
40 typedef struct _PropWidgetAssoc PropWidgetAssoc
;
60 typedef gboolean (*PropDescToPropPredicate
)(const PropDescription
*pdesc
);
62 struct _PropWidgetAssoc
{
67 struct _PropDialog
{ /* This is to be treated as opaque ! */
68 WIDGET
*widget
; /* widget of self */
70 GPtrArray
*props
; /* of Property * */
71 GArray
*prop_widgets
; /* of PropWidgetAssoc. This is a "flat" listing of
72 properties and widgets (no nesting information is
74 Object
*obj_copy
; /* if !NULL, a copy of the object which can be used
76 Object
*orig_obj
; /* The original object (do not touch !) */
78 GPtrArray
*containers
;
84 struct _PropEventData
{
86 guint my_index
; /* in dialog->propwidgets */
91 typedef gboolean (*PropEventHandler
) (Object
*obj
, Property
*prop
);
93 struct _PropEventHandlerChain
{
94 PropEventHandler handler
;
95 PropEventHandlerChain
*chain
;
98 /* PropertyType operations : */
100 /* allocate a new, empty property. */
101 typedef Property
* (*PropertyType_New
) (const PropDescription
*pdesc
,
102 PropDescToPropPredicate reason
);
103 /* free the property -- must skip NULL values. */
104 typedef void (* PropertyType_Free
)(Property
*prop
);
105 /* Copy the data member of the property. -- must skip NULL values. */
106 typedef Property
*(* PropertyType_Copy
)(Property
*src
);
107 /* Create a widget capable of editing the property. Add it to the last container (or
108 add/remove container levels). */
109 typedef WIDGET
*(* PropertyType_GetWidget
)(Property
*prop
,
112 /* Get the value of the property into the widget */
113 typedef void (* PropertyType_ResetWidget
)(const Property
*prop
, WIDGET
*widget
);
114 /* Set the value of the property from the current value of the widget */
115 typedef void (* PropertyType_SetFromWidget
)(Property
*prop
, WIDGET
*widget
);
116 /* load/save a property */
117 typedef void (*PropertyType_Load
)(Property
*prop
, AttributeNode attr
, DataNode data
);
118 typedef void (*PropertyType_Save
)(Property
*prop
, AttributeNode attr
);
120 /* If a property descriptor can be merged with another
121 (DONT_MERGE has already been handled) */
122 typedef gboolean (*PropertyType_CanMerge
)(const PropDescription
*pd1
,const PropDescription
*pd2
);
123 typedef void (*PropertyType_GetFromOffset
)(const Property
*prop
,
124 void *base
, guint offset
, guint offset2
);
125 typedef void (*PropertyType_SetFromOffset
)(Property
*prop
,
126 void *base
, guint offset
, guint offset2
);
128 typedef struct _PropertyOps PropertyOps
;
130 struct _PropertyOps
{
131 PropertyType_New new_prop
;
132 PropertyType_Free free
;
133 PropertyType_Copy copy
;
134 PropertyType_Load load
;
135 PropertyType_Save save
;
136 PropertyType_GetWidget get_widget
;
137 PropertyType_ResetWidget reset_widget
;
138 PropertyType_SetFromWidget set_from_widget
;
140 PropertyType_CanMerge can_merge
;
142 PropertyType_GetFromOffset get_from_offset
;
143 PropertyType_SetFromOffset set_from_offset
;
146 typedef const gchar
*PropertyType
;
148 /* Basic types (can be used as building blocks) : */
149 #define PROP_TYPE_INVALID "invalid" /* InvalidProperty */
150 #define PROP_TYPE_NOOP "noop" /* NoopProperty */
151 #define PROP_TYPE_UNIMPLEMENTED "unimplemented" /* UnimplementedProperty */
153 /* Integral types : */
154 #define PROP_TYPE_CHAR "char" /* CharProperty */
155 #define PROP_TYPE_BOOL "bool" /* BoolProperty */
156 #define PROP_TYPE_INT "int" /* IntProperty */
157 #define PROP_TYPE_INTARRAY "intarray" /* IntarrayProperty */
158 #define PROP_TYPE_ENUM "enum" /* EnumProperty */
159 #define PROP_TYPE_ENUMARRAY "enumarray" /* EnumarrayProperty */
162 #define PROP_TYPE_MULTISTRING "multistring" /* StringProperty */
163 /* (same as STRING but with (gint)extra_data lines) */
164 #define PROP_TYPE_STRING "string" /* StringProperty */
165 #define PROP_TYPE_FILE "file" /* StringProperty */
166 #define PROP_TYPE_TEXT "text" /* can't be visible */ /* TextProperty */
168 /* Geometric types : */
169 #define PROP_TYPE_REAL "real" /* RealProperty */
170 #define PROP_TYPE_POINT "point" /* PointProperty */
171 #define PROP_TYPE_POINTARRAY "pointarray" /* PointarrayProperty */
172 #define PROP_TYPE_BEZPOINT "bezpoint" /* BezPointProperty */
173 #define PROP_TYPE_BEZPOINTARRAY "bezpointarray" /* BezPointarrayProperty */
174 #define PROP_TYPE_RECT "rect" /* RectProperty */
175 #define PROP_TYPE_ENDPOINTS "endpoints" /* EndpointsProperty */
176 #define PROP_TYPE_CONNPOINT_LINE "connpoint_line" /* Connpoint_LineProperty */
178 /* Attribute types : */
179 #define PROP_TYPE_LINESTYLE "linestyle" /* LinestyleProperty */
180 #define PROP_TYPE_ARROW "arrow" /* ArrowProperty */
181 #define PROP_TYPE_COLOUR "colour" /* ColorProperty */
182 #define PROP_TYPE_FONT "font" /* FontProperty */
185 #define PROP_TYPE_STATIC "static" /* StaticProperty */
186 /* (tooltip is used as a (potentially big) static label) */
187 #define PROP_TYPE_BUTTON "button" /* ButtonProperty */
188 /* (tooltip is the button's label. Put an empty description). */
189 #define PROP_TYPE_NOTEBOOK_BEGIN "nb_begin" /* NotebookProperty */
190 #define PROP_TYPE_NOTEBOOK_END "nb_end" /* NotebookProperty */
191 #define PROP_TYPE_NOTEBOOK_PAGE "nb_page" /* NotebookProperty */
192 #define PROP_TYPE_MULTICOL_BEGIN "mc_begin" /* MulticolProperty */
193 #define PROP_TYPE_MULTICOL_END "mc_end" /* MulticolProperty */
194 #define PROP_TYPE_MULTICOL_COLUMN "mc_col" /* MulticolProperty */
195 #define PROP_TYPE_FRAME_BEGIN "f_begin" /* FrameProperty */
196 #define PROP_TYPE_FRAME_END "f_end" /* FrameProperty */
197 #define PROP_TYPE_LIST "list" /* ListProperty */
198 /* (offset is a GPtrArray of (const gchar *). offset2 is a gint, index of the
199 active item, -1 if none active.) */
201 /* Special types : */
202 #define PROP_TYPE_SARRAY "sarray" /* ArrayProperty */
203 #define PROP_TYPE_DARRAY "darray" /* ArrayProperty */
205 /* **************************************************************** */
207 struct _PropDescription
{
211 const gchar
*description
;
212 const gchar
*tooltip
;
214 /* Holds some extra data whose meaning is dependent on the property type.
215 * For example, int or float may use bounds for a spin button, and enums
216 * may use a list of string names for enumeration values. */
219 /* if the property widget can send events when it's somehow interacted with,
220 control will be passed to object_type-supplied event_handler, and
221 event->dialog->obj_copy will be current with the dialog's values.
222 When control comes back, event->dialog->obj_copy's properties will be
223 brought back into the dialog. */
224 PropEventHandler event_handler
;
226 GQuark quark
; /* quark for property name -- helps speed up lookups. */
229 /* only used by dynamically constructed property descriptors (eg. groups) */
230 PropEventHandlerChain chain_handler
;
232 const PropertyOps
*ops
;
235 #define PROP_FLAG_VISIBLE 0x0001
236 #define PROP_FLAG_DONT_SAVE 0x0002
237 #define PROP_FLAG_DONT_MERGE 0x0004 /* in case group properties are edited */
238 #define PROP_FLAG_NO_DEFAULTS 0x0008 /* don't edit this in defaults dlg. */
240 #define PROP_DESC_END { NULL, 0, 0, NULL, NULL, NULL, 0 }
242 /* extra data pointers for various property types */
243 typedef struct _PropNumData PropNumData
;
244 struct _PropNumData
{
245 gfloat min
, max
, step
;
247 typedef struct _PropEnumData PropEnumData
;
248 struct _PropEnumData
{
253 typedef gpointer (*NewRecordFunc
)(void);
254 typedef void (*FreeRecordFunc
)(gpointer rec
);
256 typedef struct _PropDescCommonArrayExtra PropDescCommonArrayExtra
;
257 struct _PropDescCommonArrayExtra
{ /* don't use this directly.
259 PropDescription
*record
;
260 const gchar
*composite_type
; /* can be NULL. */
263 typedef struct _PropDescDArrayExtra PropDescDArrayExtra
;
264 struct _PropDescDArrayExtra
{
265 PropDescCommonArrayExtra common
; /* must be first */
266 NewRecordFunc newrec
;
267 FreeRecordFunc freerec
;
270 typedef struct _PropDescSArrayExtra PropDescSArrayExtra
;
271 struct _PropDescSArrayExtra
{
272 PropDescCommonArrayExtra common
; /* must be first */
273 guint element_size
; /* sizeof(record) */
278 /* ******************* */
279 /* The Property itself */
280 /* ******************* */
286 const PropDescription
*descr
;
289 PropEventHandler event_handler
;
290 PropDescToPropPredicate reason
; /* why has this property been created from
292 guint experience
; /* flags PXP_.... */
294 const PropertyOps
*ops
; /* points to common_prop_ops */
295 const PropertyOps
*real_ops
; /* == descr->ops */
298 /* prop->experience flags */
299 #define PXP_COPIED 0x00000001 /* has been copied */
300 #define PXP_COPY 0x00000002 /* is a copy */
301 #define PXP_GET_WIDGET 0x00000004
302 #define PXP_RESET_WIDGET 0x00000008
303 #define PXP_SET_FROM_WIDGET 0x00000010
304 #define PXP_LOADED 0x00000020
305 #define PXP_SAVED 0x00000040
306 #define PXP_GFO 0x00000080
307 #define PXP_SFO 0x00000100
308 #define PXP_SHAMELESS 0xFFFFFFFF
310 /* ***************************************************************** */
311 /* Operations on property descriptors and property descriptor lists. */
313 void prop_desc_list_calculate_quarks(PropDescription
*plist
);
314 /* plist must have all quarks calculated in advance */
315 const PropDescription
*prop_desc_list_find_prop(const PropDescription
*plist
,
317 /* finds the real handler in case there are several levels of indirection */
318 PropEventHandler
prop_desc_find_real_handler(const PropDescription
*pdesc
);
319 /* free a handler indirection list */
320 void prop_desc_free_handler_chain(PropDescription
*pdesc
);
321 /* free a handler indirection list in a list of descriptors */
322 void prop_desc_list_free_handler_chain(PropDescription
*pdesc
);
323 /* insert an event handler */
324 void prop_desc_insert_handler(PropDescription
*pdesc
,
325 PropEventHandler handler
);
327 /* operations on lists of property description lists */
328 PropDescription
*prop_desc_lists_union(GList
*plists
);
329 PropDescription
*prop_desc_lists_intersection(GList
*plists
);
332 /* ********************************************* */
333 /* Functions for dealing with the Type Registry */
334 void prop_type_register(PropertyType type
, const PropertyOps
*ops
);
335 const PropertyOps
*prop_type_get_ops(PropertyType type
);
337 /* *********************************************************** */
338 /* functions for manipulating a property array. */
340 void prop_list_free(GPtrArray
*plist
);
343 /* copies the whole property structure, including the data. */
344 GPtrArray
*prop_list_copy(GPtrArray
*plist
);
345 /* copies the whole property structure, excluding the data. */
346 GPtrArray
*prop_list_copy_empty(GPtrArray
*plist
);
347 /* Appends copies of the properties in the second list to the first. */
348 void prop_list_add_list (GPtrArray
*props
, const GPtrArray
*ptoadd
);
350 GPtrArray
*prop_list_from_descs(const PropDescription
*plist
,
351 PropDescToPropPredicate pred
);
353 GPtrArray
*prop_list_from_single(Property
*prop
);
355 /* Some predicates: */
356 gboolean
pdtpp_true(const PropDescription
*pdesc
); /* always true */
357 gboolean
pdtpp_is_visible(const PropDescription
*pdesc
);
358 gboolean
pdtpp_is_not_visible(const PropDescription
*pdesc
);
359 gboolean
pdtpp_do_save(const PropDescription
*pdesc
);
360 gboolean
pdtpp_do_not_save(const PropDescription
*pdesc
);
361 /* all but DONT_MERGE and NO_DEFAULTS: */
362 gboolean
pdtpp_defaults(const PropDescription
*pdesc
);
363 /* actually used for the "reason" parameter, not as predicates (synonyms for pdtpp_true) */
364 gboolean
pdtpp_synthetic(const PropDescription
*pdesc
);
365 gboolean
pdtpp_from_object(const PropDescription
*pdesc
);
368 /* Swallows the property into a single property list. Can be given NULL.
369 Don't free yourself the property afterwards; prop_list_free() the list
371 You regain responsibility for the property if you g_ptr_array_destroy() the
373 GPtrArray
*prop_list_of_single(Property
*prop
);
375 /* Create a new property of the required type, with the required name.
376 A PropDescription might be created on the fly. The property's value is not
377 initialised (actually, it's zero). */
378 Property
*make_new_prop(const char *name
, PropertyType type
, guint flags
);
382 /* Offset to fields in objects */
384 /* calculates the offset of a structure member within the structure */
386 #define offsetof(type, member) ( (int) & ((type*)0) -> member )
388 typedef struct _PropOffset PropOffset
;
393 int offset2
; /* maybe for point lists, etc */
396 const PropertyOps
*ops
;
399 /* ************************************************ */
400 /* routines used by Objects or to deal with Objects */
402 /* returns TRUE if this object can be handled (at least in part) through this
404 gboolean
object_complies_with_stdprop(const Object
*obj
);
406 /* will do whatever is needed to make the PropDescription * list look good to
407 the rest of the properties code. Can return NULL. */
408 const PropDescription
*object_get_prop_descriptions(const Object
*obj
);
410 gboolean
object_get_props_from_offsets(Object
*obj
, PropOffset
*offsets
,
412 gboolean
object_set_props_from_offsets(Object
*obj
, PropOffset
*offsets
,
415 /* apply some properties and return a corresponding object change */
416 ObjectChange
*object_apply_props(Object
*obj
, GPtrArray
*props
);
418 /* standard properties dialogs that can be used for objects that
419 * implement describe_props, get_props and set_props */
420 WIDGET
*object_create_props_dialog (Object
*obj
);
421 ObjectChange
*object_apply_props_from_dialog (Object
*obj
, WIDGET
*dialog
);
423 /* create a property from the object's property descriptors. To be freed with
424 prop->ops->free(prop); or put it into a single property list. NULL if object
425 has nothing matching. Property's value is initialised by the object.
427 Property
*object_prop_by_name(Object
*obj
, const char *name
);
428 Property
*object_prop_by_name_type(Object
*obj
, const char *name
, const char *type
);
430 /* standard way to load/save properties of an object */
431 void object_load_props(Object
*obj
, ObjectNode obj_node
);
432 void object_save_props(Object
*obj
, ObjectNode obj_node
);
434 /* standard way to copy the properties of an object into another (of the
436 void object_copy_props(Object
*dest
, Object
*src
);
438 /* Return a reference to objects property with 'name' or NULL */
439 Property
*object_get_prop_by_name (Object
*obj
, const char* name
);
441 /* ************************************************************* */
443 void stdprops_init(void);
445 /* ************************************************************* */
447 /* standard properties. By using these, the intersection of the properties
448 * of a number of objects should be greater, making setting properties on
451 /* HB: exporting the following two vars by GIMPVAR==dllexport/dllimport,
452 * does mean the pointers used below have to be calculated
453 * at run-time by the loader, because they will exist
454 * only once in the process space and dynamic link libraries may be
455 * relocated. As a result their address is no longer constant.
456 * Indeed it causes compile time errors with MSVC (initialzer
458 * To fix it they are moved form properties.c and declared as static
462 static PropNumData prop_std_line_width_data
= { 0.0, 10.0, 0.01 };
463 static PropNumData prop_std_text_height_data
= { 0.1, 10.0, 0.1 };
464 static PropEnumData prop_std_text_align_data
[] = {
465 { N_("Left"), ALIGN_LEFT
},
466 { N_("Center"), ALIGN_CENTER
},
467 { N_("Right"), ALIGN_RIGHT
},
471 extern PropNumData prop_std_line_width_data
, prop_std_text_height_data
;
472 extern PropEnumData prop_std_text_align_data
[];
475 #define PROP_STD_LINE_WIDTH \
476 { "line_width", PROP_TYPE_REAL, PROP_FLAG_VISIBLE, \
477 N_("Line width"), NULL, &prop_std_line_width_data }
478 #define PROP_STD_LINE_COLOUR \
479 { "line_colour", PROP_TYPE_COLOUR, PROP_FLAG_VISIBLE, \
480 N_("Line colour"), NULL, NULL }
481 #define PROP_STD_LINE_STYLE \
482 { "line_style", PROP_TYPE_LINESTYLE, PROP_FLAG_VISIBLE, \
483 N_("Line style"), NULL, NULL }
485 #define PROP_STD_FILL_COLOUR \
486 { "fill_colour", PROP_TYPE_COLOUR, PROP_FLAG_VISIBLE, \
487 N_("Fill colour"), NULL, NULL }
488 #define PROP_STD_SHOW_BACKGROUND \
489 { "show_background", PROP_TYPE_BOOL, PROP_FLAG_VISIBLE, \
490 N_("Draw background"), NULL, NULL }
492 #define PROP_STD_START_ARROW \
493 { "start_arrow", PROP_TYPE_ARROW, PROP_FLAG_VISIBLE, \
494 N_("Start arrow"), NULL, NULL }
495 #define PROP_STD_END_ARROW \
496 { "end_arrow", PROP_TYPE_ARROW, PROP_FLAG_VISIBLE, \
497 N_("End arrow"), NULL, NULL }
499 #define PROP_STD_TEXT \
500 { "text", PROP_TYPE_TEXT, PROP_FLAG_DONT_SAVE, \
501 N_("Text"), NULL, NULL }
502 #define PROP_STD_SAVED_TEXT \
503 { "text", PROP_TYPE_TEXT, 0, \
504 N_("Text"), NULL, NULL }
505 #define PROP_STD_TEXT_ALIGNMENT \
506 { "text_alignment", PROP_TYPE_ENUM, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
507 N_("Text alignment"), NULL, prop_std_text_align_data }
508 #define PROP_STD_TEXT_FONT \
509 { "text_font", PROP_TYPE_FONT, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
510 N_("Font"), NULL, NULL }
511 #define PROP_STD_TEXT_HEIGHT \
512 { "text_height", PROP_TYPE_REAL, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
513 N_("Font size"), NULL, &prop_std_text_height_data }
514 #define PROP_STD_TEXT_COLOUR \
515 { "text_colour", PROP_TYPE_COLOUR, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, \
516 N_("Text colour"), NULL, NULL }
518 /* Convenience macros */
519 #define PROP_NOTEBOOK_BEGIN(name) \
520 { "nbook_" name, PROP_TYPE_NOTEBOOK_BEGIN, \
521 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
522 #define PROP_STD_NOTEBOOK_BEGIN PROP_NOTEBOOK_BEGIN("std")
523 #define PROP_OFFSET_NOTEBOOK_BEGIN(name) \
524 { "nbook_" name, PROP_TYPE_NOTEBOOK_BEGIN, 0}
525 #define PROP_OFFSET_STD_NOTEBOOK_BEGIN PROP_OFFSET_NOTEBOOK_BEGIN("std")
527 #define PROP_NOTEBOOK_END(name) \
528 { "nbook_" name "_end", PROP_TYPE_NOTEBOOK_END, \
529 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
530 #define PROP_STD_NOTEBOOK_END PROP_NOTEBOOK_END("std")
531 #define PROP_OFFSET_NOTEBOOK_END(name) \
532 { "nbook_" name "_end", PROP_TYPE_NOTEBOOK_END, 0}
533 #define PROP_OFFSET_STD_NOTEBOOK_END PROP_OFFSET_NOTEBOOK_END("std")
535 #define PROP_NOTEBOOK_PAGE(name,flags,descr) \
536 { "nbook_page_" name, PROP_TYPE_NOTEBOOK_PAGE, \
537 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|flags,descr,NULL}
538 #define PROP_OFFSET_NOTEBOOK_PAGE(name) \
539 { "nbook_page_" name , PROP_TYPE_NOTEBOOK_PAGE, 0}
541 #define PROP_MULTICOL_BEGIN(name) \
542 { "mcol_" name, PROP_TYPE_MULTICOL_BEGIN, \
543 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
544 #define PROP_STD_MULTICOL_BEGIN PROP_MULTICOL_BEGIN("std")
545 #define PROP_OFFSET_MULTICOL_BEGIN(name) \
546 { "mcol_" name, PROP_TYPE_NOTEBOOK_BEGIN, 0}
547 #define PROP_OFFSET_STD_MULTICOL_BEGIN PROP_OFFSET_MULTICOL_BEGIN("std")
549 #define PROP_MULTICOL_END(name) \
550 { "mcol_" name "_end", PROP_TYPE_MULTICOL_END, \
551 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL}
552 #define PROP_STD_MULTICOL_END PROP_MULTICOL_END("std")
553 #define PROP_OFFSET_MULTICOL_END(name) \
554 { "mcol_" name "_end", PROP_TYPE_NOTEBOOK_END, 0}
555 #define PROP_OFFSET_STD_MULTICOL_END PROP_OFFSET_MULTICOL_END("std")
557 #define PROP_MULTICOL_COLUMN(name) \
558 { "mcol_col_" name, PROP_TYPE_MULTICOL_COLUMN, \
559 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE,NULL,NULL}
560 #define PROP_OFFSET_MULTICOL_COLUMN(name) \
561 { "mcol_col_" name, PROP_TYPE_MULTICOL_COLUMN, 0}
563 #define PROP_FRAME_BEGIN(name,flags,descr) \
564 { "frame_" name, PROP_TYPE_FRAME_BEGIN, \
565 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|flags, descr, NULL}
566 #define PROP_OFFSET_FRAME_BEGIN(name) \
567 { "frame_" name, PROP_TYPE_FRAME_BEGIN, 0}
569 #define PROP_FRAME_END(name,flags) \
570 { "frame_" name "_end", PROP_TYPE_FRAME_END, \
571 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|flags, NULL, NULL}
572 #define PROP_OFFSET_FRAME_END(name) \
573 { "frame_" name "_end", PROP_TYPE_NOTEBOOK_END, 0}