C++ MonsterDoc:
CDirtyEditText

Home
Contact
Copyright
|| All Classes ||
||overview|| ||access|| ||inheritance|| ||descriptions||

Class Overview

A subclass of LEditText which keeps track of user modifications so it is suitable in documents featuring a Save command. The class will track user changes to the document, but the programmer will need to use the SetDirty method in order to track programmatic changes.

Warning AlertThis class does not track programmatic changes to the state of the object. The programmer will need to use the SetDirty method to indicate such changes.

Inheritance

CDirtyEditText is a subclass of the PowerPlant class LEditText.

Requirements

CDirtyEditText requires the PowerPlant classes LEditText and LStream.

Files

  • CDirtyEditText.h
  • CDirtyEditText.cp

||overview|| ||access|| ||inheritance|| ||descriptions||

Members by Access

public

enum {
class_ID = FOUR_CHAR_CODE('Detx')
};

CDirtyEditText(
PowerPlant::LStream* inStream
);

virtual
void
UserChangedText(
void
);

bool
IsDirty(
void
) const;

void
SetDirty(
bool inDirty
);

protected

private

bool
iAmDirty;

||overview|| ||access|| ||inheritance|| ||descriptions||

Members by Inheritance

statics

The class introduces no new statics.

overrides

virtual
void
UserChangedText(
void
);

is overridden from LEditText.

new virtuals

The class introduces no new virtuals.

||overview|| ||access|| ||inheritance|| ||descriptions||

Member Descriptions

Member Data

bool
iAmDirty;

Set to true if the text in the object has been modified.

CDirtyEditText

Constructs a CDirtyEditText. Initially, the view is considered to be clean.

CDirtyEditText(
PowerPlant::LStream* inStream
);

Passes the stream to LEditText.

UserChangedText

Overrriden to set the CDirtyEditText object to dirty and update the command status.

virtual
void
UserChangedText(
void
);

IsDirty

Returns true if the CDirtyEditText object is modified (dirty) and false otherwise.

bool
IsDirty(
void
) const;

SetDirty

Allows the programmer to set the state of the CDirtyEditText. The object to should be set to dirty (true) if the programmer modifies it programmatically and it should be set to clean (false) when the object is saved.

void
SetDirty(
bool inDirty
);


©1999-2004 Monsterworks

Last Modified: Monday, October 2, 2000