|
|
1.1 root 1: #import "drawundo.h"
2:
3: /*
4: * This change is created when the user begins editing a text
5: * graphic, either by clicking in graphic while in the text tool
6: * is selected or by creating a new graphic with the text tool.
7: * Undoing this change inserts the removes the text editing
8: * cursor from the text. More significantly, undoing this
9: * change swaps the contents of the field editor back into the
10: * TextGraphic and redoing this change swaps the contents of the
11: * TextGraphic into the field editor.
12: */
13:
14: @interface StartEditingGraphicsChange(PrivateMethods)
15:
16: @end
17:
18: @implementation StartEditingGraphicsChange
19:
20: - initGraphic:aGraphic
21: {
22: [super init];
23: graphic = aGraphic;
24:
25: return self;
26: }
27:
28: - (const char *)changeName
29: {
30: return NXLocalStringFromTable("Operations", "Begin Editing", NULL, "The operation of starting to edit some text.");
31: }
32:
33: - undoChange
34: {
35: [graphic resignFieldEditor];
36: [NXApp endEditMode];
37: return [super undoChange];
38: }
39:
40: - redoChange
41: {
42: [graphic prepareFieldEditor];
43: [NXApp startEditMode];
44: return [super redoChange];
45: }
46:
47: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.