File: spec_algo

package info (click to toggle)
libforms 1.0.93sp1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 11,548 kB
  • ctags: 9,107
  • sloc: ansic: 97,227; sh: 9,236; makefile: 858
file content (38 lines) | stat: -rw-r--r-- 1,412 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Here is how object specific info is initialized:
----------------------------------------------

As soon as an object is created, the object specific
info is converted into a "superSpec", and this superspec
thing is "hang" on the obj->u_vdata field.

In editing mode:
  In object specifc editing, upon entry, we copy the superSpec
  into obj->spec, essentially wiping out all the testing residue
  and stuff put there for testing only.

  All the changes that occur while in the editing only apply
  to obj->spec, we never touch the superspec. Only when
  editing is done and accepted, we copy the spec into superSpec
  again. In case of cancel or restore, we copy superspec
  into obj->spec, which in effect undoes all the changes made.

In testing mode:
   Object testing etc. only changes obj->spec, it never touches the
   superspec.

In saving the spec info:
   We always save the spec info using superSPEC.

In Loading the spec info:
   spec info is first loaded into a superspec, which
   is then transfered into obj->spec.

For object like buttons where some of the information is not
on the SPEC structure, we'll have to create the members
on SuperSPEC as well as a seperate structure that
"hangs off" of SuperSPEC. When modifying attributes,
we modify this seperate structure as if it is part of the button.
We copy this info SuperSPEC only if AcceptSpec.

When save/emit, always do it from SuperSPEC