JX Application Framework
|
#include <JXFileInput.h>
Public Member Functions | |
StyledText (JXFileInput *field, JFontManager *fontManager) | |
![]() | |
StyledText (JXFSInputBase *field, JFontManager *fontManager) | |
![]() | |
StyledText (const bool acceptNewline, JFontManager *fontManager) | |
![]() | |
JXStyledText (const bool useMultipleUndo, const bool pasteStyledText, JFontManager *fontManager) | |
JXStyledText (const JXStyledText &source) | |
~JXStyledText () override | |
![]() | |
JStyledText (const bool useMultipleUndo, const bool pasteStyledText) | |
JStyledText (const JStyledText &source) | |
~JStyledText () override | |
bool | IsEmpty () const |
bool | EndsWithNewline () const |
const JString & | GetText () const |
bool | SetText (const JString &text, const JRunArray< JFont > *style=nullptr) |
const JRunArray< JFont > & | GetStyles () const |
bool | WillPasteStyledText () const |
void | RestyleAll () |
bool | IsCharacterInWord (const JUtf8Character &c) const |
TextIndex | GetWordStart (const TextIndex &index) const |
TextIndex | GetWordEnd (const TextIndex &index) const |
TextIndex | GetPartialWordStart (const TextIndex &index) const |
TextIndex | GetPartialWordEnd (const TextIndex &index) const |
TextIndex | GetParagraphStart (const TextIndex &index) const |
TextIndex | GetParagraphEnd (const TextIndex &index) const |
TextIndex | GetBeyondEnd () const |
JIndex | GetColumnForChar (const TextIndex &lineStart, const TextIndex &location) const |
TextIndex | AdjustTextIndex (const TextIndex &index, const JInteger charDelta) const |
JStringIterator * | GetConstIterator (const JStringIterator::Position pos, const TextIndex &index) const |
void | DisposeConstIterator (JStringIterator *iter) const |
bool | ReadPlainText (const JString &fileName, PlainTextFormat *format, const bool acceptBinaryFile=true) |
void | WritePlainText (const JString &fileName, const PlainTextFormat format) const |
void | WritePlainText (std::ostream &output, const PlainTextFormat format) const |
bool | ReadPrivateFormat (std::istream &input) |
void | WritePrivateFormat (std::ostream &output) const |
JStringMatch | SearchForward (const TextIndex &startIndex, const JRegex ®ex, const bool entireWord, const bool wrapSearch, bool *wrapped) const |
JStringMatch | SearchBackward (const TextIndex &startIndex, const JRegex ®ex, const bool entireWord, const bool wrapSearch, bool *wrapped) const |
TextCount | ReplaceMatch (const JStringMatch &match, const JString &replaceStr, JInterpolate *interpolator, const bool preserveCase, const bool createUndo=true) |
TextRange | ReplaceAllInRange (const TextRange &range, const JRegex ®ex, const bool entireWord, const JString &replaceStr, JInterpolate *interpolator, const bool preserveCase) |
bool | IsEntireWord (const TextRange &range) const |
bool | SearchForward (std::function< bool(const JFont &)> match, const TextIndex &startIndex, const bool wrapSearch, bool *wrapped, TextRange *range) const |
bool | SearchBackward (std::function< bool(const JFont &)> match, const TextIndex &startIndex, const bool wrapSearch, bool *wrapped, TextRange *range) const |
JFont | GetFont (const JIndex charIndex) const |
bool | SetFontName (const TextRange &range, const JString &name, const bool clearUndo) |
bool | SetFontSize (const TextRange &range, const JSize size, const bool clearUndo) |
bool | SetFontBold (const TextRange &range, const bool bold, const bool clearUndo) |
bool | SetFontItalic (const TextRange &range, const bool italic, const bool clearUndo) |
bool | SetFontUnderline (const TextRange &range, const JSize count, const bool clearUndo) |
bool | SetFontStrike (const TextRange &range, const bool strike, const bool clearUndo) |
bool | SetFontColor (const TextRange &range, const JColorID color, const bool clearUndo) |
bool | SetFontStyle (const TextRange &range, const JFontStyle &style, const bool clearUndo) |
void | SetFont (const TextRange &range, const JFont &font, const bool clearUndo) |
void | SetAllFontNameAndSize (const JString &name, const JSize size, const bool clearUndo) |
const JFont & | GetDefaultFont () const |
void | SetDefaultFontName (const JString &name) |
void | SetDefaultFontSize (const JSize size) |
void | SetDefaultFontStyle (const JFontStyle &style) |
void | SetDefaultFont (const JFont &f) |
JFont | CalcInsertionFont (const TextIndex &index) const |
TextRange | Outdent (const TextRange &range, const JSize tabCount=1, const bool force=false) |
TextRange | Indent (const TextRange &range, const JSize tabCount=1) |
TextRange | CleanWhitespace (const TextRange &range, const bool align) |
bool | TabInsertsSpaces () const |
void | TabShouldInsertSpaces (const bool spaces=true) |
bool | WillAutoIndent () const |
void | ShouldAutoIndent (const bool indent=true) |
bool | HasSingleUndo () const |
bool | HasMultipleUndo (bool *canUndo, bool *canRedo) const |
void | Undo () |
void | Redo () |
void | ClearUndo () |
void | DeactivateCurrentUndo () |
JSize | GetUndoDepth () const |
void | SetUndoDepth (const JSize maxUndoCount) |
bool | IsAtLastSaveLocation () const |
void | SetLastSaveLocation () |
void | ClearLastSaveLocation () |
bool | Copy (const TextRange &range, JString *text, JRunArray< JFont > *style=nullptr) const |
TextRange | Paste (const TextRange &range, const JString &text, const JRunArray< JFont > *style=nullptr) |
bool | MoveText (const TextRange &srcRange, const TextIndex &origDestIndex, const bool copy, TextRange *newRange) |
TextIndex | BackwardDelete (const TextIndex &lineStart, const TextIndex &caretIndex, const bool deleteToTabStop, JString *returnText=nullptr, JRunArray< JFont > *returnStyle=nullptr, JUndo **undo=nullptr) |
void | ForwardDelete (const TextIndex &lineStart, const TextIndex &caretIndex, const bool deleteToTabStop, JString *returnText=nullptr, JRunArray< JFont > *returnStyle=nullptr, JUndo **undo=nullptr) |
void | DeleteText (const TextRange &range) |
JUndo * | InsertCharacter (const TextRange &replaceRange, const JUtf8Character &key, const JFont &font, TextCount *count) |
JStyledText::TextRange | InsertSpacesForTab (const TextIndex &lineStart, const TextRange &replaceRange) |
bool | CleanRightMargin (TextIndex *caretIndex, const TextRange &selectionRange, const bool coerce) |
JSize | GetCRMLineWidth () const |
void | SetCRMLineWidth (const JSize charCount) |
JSize | GetCRMTabCharCount () const |
void | SetCRMTabCharCount (const JSize charCount) |
JSize | CRMGetTabWidth (const JIndex textColumn) const |
bool | GetCRMRuleList (const CRMRuleList **ruleList) const |
void | SetCRMRuleList (CRMRuleList *ruleList, const bool teOwnsRuleList) |
void | ClearCRMRuleList () |
void | SetCharacterInWordFunction (const std::function< bool(const JUtf8Character &)> f) |
TextRange | SelectAll () const |
TextRange | CharToTextRange (const TextIndex *lineStart, const JCharacterRange &charRange) const |
void | SetBlockSizes (const JSize textLgSize, const JSize styleBlockSize) |
bool | CRMGetPrefix (TextIndex *startIndex, const TextIndex &beyondEndIndex, JString *linePrefix, JSize *columnCount, JIndex *ruleIndex) const |
bool | CRMLineMatchesRest (const TextRange &range) const |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
virtual JString | ToString () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Protected Member Functions | |
JSize | ComputeErrorLength (JXFSInputBase *field, const JSize totalLength, const JString &fullName) const override |
![]() | |
void | AdjustStylesBeforeBroadcast (const JString &text, JRunArray< JFont > *styles, JStyledText::TextRange *recalcRange, JStyledText::TextRange *redrawRange, const bool deletion) override |
![]() | |
bool | NeedsToFilterText (const JString &text) const override |
bool | FilterText (JString *text, JRunArray< JFont > *style) override |
![]() | |
bool | NeedsToAdjustFontToDisplayGlyphs (const JString &text, const JRunArray< JFont > &style) const override |
bool | AdjustFontToDisplayGlyphs (const TextRange &range, const JString &text, JRunArray< JFont > *style) override |
![]() | |
bool | IsEntireWord (const JString &text, const TextRange &range) const |
void | SetFont (const TextRange &range, const JRunArray< JFont > &f) |
void | BroadcastTextChanged (const TextRange &range, const JInteger charDelta, const JInteger byteDelta, const bool deletion, const bool adjustStyles=true) |
void | BroadcastUndoFinished (const TextRange &range) |
![]() | |
JBroadcaster (const JBroadcaster &source) | |
void | ListenTo (const JBroadcaster *sender) |
void | StopListening (const JBroadcaster *sender) |
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
template<class T > | |
void | Send (JBroadcaster *recipient, const T &message) |
template<class T > | |
void | Broadcast (const T &message) |
virtual void | Receive (JBroadcaster *sender, const Message &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
Additional Inherited Members | |
![]() | |
enum | PlainTextFormat { kUNIXText , kMacintoshText , kDOSText } |
![]() | |
static bool | ReadPrivateFormat (std::istream &input, JString *text, JRunArray< JFont > *style) |
static void | WritePrivateFormat (std::ostream &output, const JFileVersion vers, const JString &text, const JRunArray< JFont > &style, const JCharacterRange &charRange) |
static bool | ContainsIllegalChars (const JString &text) |
static bool | RemoveIllegalChars (JString *text, JRunArray< JFont > *style=nullptr) |
static std::weak_ordering | CompareCharacterIndices (const TextIndex &i, const TextIndex &j) |
static std::weak_ordering | CompareByteIndices (const TextIndex &i, const TextIndex &j) |
![]() | |
static const JUtf8Byte * | kTextSet = "TextSet::JStyledText" |
static const JUtf8Byte * | kTextChanged = "TextChanged::JStyledText" |
static const JUtf8Byte * | kDefaultFontChanged = "DefaultFontChanged::JStyledText" |
static const JUtf8Byte * | kUndoFinished = "UndoFinished::JStyledText" |
static const JUtf8Byte * | kWillBeBusy = "WillBeBusy::JStyledText" |
|
inline |
|
overrideprotectedvirtual |
Return the number of characters that should be marked as invalid.
Implements JXFSInputBase::StyledText.