Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Command.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5namespace Stroika::Frameworks::Led {
6
7#if qStroika_Frameworks_Led_SupportGDI
8 /*
9 ********************************************************************************
10 ***************************** Implementation Details ***************************
11 ********************************************************************************
12 */
13 // class SnoopingCommandHandler;
14 /*
15 @METHOD: Command::Command
16 @DESCRIPTION: <p>Construct a Command object. The constructor takes an optional bool arg <code>done</code> because
17 sometimes commands are created already done (but this defaults to false).</p>
18 */
19 inline Command::Command (bool done)
20 : fDone (done)
21 {
22 }
23 /*
24 @METHOD: Command::Do
25 @DESCRIPTION: <p>Perform the actual commands action.</p>
26 */
27 inline void Command::Do (TextInteractor& /*interactor*/)
28 {
29 fDone = true;
30 }
31 /*
32 @METHOD: Command::UnDo
33 @DESCRIPTION: <p>Undo an already done command.</p>
34 */
35 inline void Command::UnDo (TextInteractor& /*interactor*/)
36 {
37 fDone = false;
38 }
39 /*
40 @METHOD: Command::ReDo
41 @DESCRIPTION: <p>Redo a command which has been done (or perhaps redone), and more recently undone.</p>
42 */
43 inline void Command::ReDo (TextInteractor& /*interactor*/)
44 {
45 fDone = true;
46 }
47 /*
48 @METHOD: Command::GetDone
49 @DESCRIPTION: <p>The done, and redone states are considered identical. This returns true if the command has either
50 been done, or redone (not most recently undone).</p>
51 */
52 inline bool Command::GetDone () const
53 {
54 return fDone;
55 }
56
57 // class SnoopingCommandHandler;
58 inline CommandHandler* SnoopingCommandHandler::GetRealHandler () const
59 {
60 return fRealHandler;
61 }
62
63 // class MultiLevelUndoCommandHandler;
64 /*
65 @METHOD: MultiLevelUndoCommandHandler::GetMaxUnDoLevels
66 @DESCRIPTION: <p>Gets the maximum number of undo levels the @'MultiLevelUndoCommandHandler' will support.
67 Zero is a valid # - disabling the keeping of undo information. One is a valid number - implying
68 basicly the same behavior as @'SingleUndoCommandHandler' - except that Undo isn't treated as Redo
69 after an Undo.</p>
70 <p>See @'MultiLevelUndoCommandHandler::SetMaxUnDoLevels'</p>
71
72 */
73 inline size_t MultiLevelUndoCommandHandler::GetMaxUnDoLevels ()
74 {
75 return fMaxUndoLevels;
76 }
77
78 // class InteractiveReplaceCommand::SavedTextRep
79 inline InteractiveReplaceCommand::SavedTextRep::SavedTextRep (size_t selStart, size_t selEnd)
80 : fSelStart (selStart)
81 , fSelEnd (selEnd)
82 {
83 }
84 inline InteractiveReplaceCommand::SavedTextRep::~SavedTextRep ()
85 {
86 }
87#endif
88
89}