JX Application Framework
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
JXTEBase Class Reference

#include <JXTEBase.h>

Inheritance diagram for JXTEBase:
[legend]

Classes

class  DataNotCompatible
 
struct  DisplayState
 
class  NoData
 

Public Types

enum  PartialWordModifier {
  kCtrlMetaPWMod = 0 ,
  kMod2PWMod ,
  kMod3PWMod ,
  kMod4PWMod ,
  kMod5PWMod
}
 
- Public Types inherited from JXWidget
enum  HSizingOption {
  kFixedLeft ,
  kFixedRight ,
  kHElastic
}
 
enum  VSizingOption {
  kFixedTop ,
  kFixedBottom ,
  kVElastic
}
 
- Public Types inherited from JTextEditor
enum  Type {
  kFullEditor ,
  kSelectableText ,
  kStaticText
}
 
enum  CmdIndex {
  kSeparatorCmd = 1 ,
  kUndoCmd ,
  kRedoCmd ,
  kCutCmd ,
  kCopyCmd ,
  kPasteCmd ,
  kDeleteSelCmd ,
  kSelectAllCmd ,
  kCheckSpellingCmd ,
  kCheckSpellingSelCmd ,
  kCleanRightMarginCmd ,
  kCoerceRightMarginCmd ,
  kShiftSelLeftCmd ,
  kShiftSelRightCmd ,
  kForceShiftSelLeftCmd ,
  kShowWhitespaceCmd ,
  kCleanAllWhitespaceCmd ,
  kCleanWhitespaceSelCmd ,
  kCleanAllWSAlignCmd ,
  kCleanWSAlignSelCmd ,
  kToggleReadOnlyCmd ,
  kFindDialogCmd ,
  kFindPreviousCmd ,
  kFindNextCmd ,
  kEnterSearchTextCmd ,
  kEnterReplaceTextCmd ,
  kFindSelectionBackwardCmd ,
  kFindSelectionForwardCmd ,
  kFindClipboardBackwardCmd ,
  kFindClipboardForwardCmd ,
  kReplaceSelectionCmd ,
  kReplaceFindPrevCmd ,
  kReplaceFindNextCmd ,
  kReplaceAllCmd ,
  kReplaceAllInSelectionCmd ,
  kCmdCount = kReplaceAllInSelectionCmd
}
 
enum  CaretMode {
  kLineCaret ,
  kBlockCaret
}
 
enum  CaretMotion {
  kMoveByCharacter ,
  kMoveByPartialWord ,
  kMoveByWord ,
  kMoveByLine
}
 
enum  { kMinLeftMarginWidth = 2 }
 

Public Member Functions

 ~JXTEBase () override
 
void Activate () override
 
void Deactivate () override
 
void Suspend () override
 
void Resume () override
 
void HandleKeyPress (const JUtf8Character &c, const int keySym, const JXKeyModifiers &modifiers) override
 
void HandleShortcut (const int key, const JXKeyModifiers &modifiers) override
 
JXTextMenuAppendEditMenu (JXMenuBar *menuBar, const bool showCheckSpellingCmds=false, const bool allowCheckSpelling=false, const bool showAdjustMarginsCmds=false, const bool allowAdjustMargins=false, const bool showCleanWhitespaceCmds=false, const bool allowCleanWhitespace=false, const bool showToggleReadOnly=false, const bool allowToggleReadOnly=false)
 
JXTextMenuShareEditMenu (JXTEBase *te, const bool allowCheckSpelling=false, const bool allowAdjustMargins=false, const bool allowCleanWhitespace=false, const bool allowToggleReadOnly=false)
 
void ShareEditMenu (JXTextMenu *menu, const bool allowCheckSpelling=false, const bool allowAdjustMargins=false, const bool allowCleanWhitespace=false, const bool allowToggleReadOnly=false)
 
bool HasEditMenu () const
 
bool GetEditMenu (JXTextMenu **menu) const
 
bool EditMenuIndexToCmd (const JIndex index, CmdIndex *cmd) const
 
bool EditMenuCmdToIndex (const CmdIndex cmd, JIndex *index) const
 
JXTextMenuAppendSearchMenu (JXMenuBar *menuBar)
 
JXTextMenuAppendSearchReplaceMenu (JXMenuBar *menuBar)
 
JXTextMenuShareSearchMenu (JXTEBase *te)
 
void ShareSearchMenu (JXTextMenu *menu)
 
void ShareSearchReplaceMenu (JXTextMenu *menu)
 
bool HasSearchMenu () const
 
bool GetSearchMenu (JXTextMenu **menu) const
 
bool SearchMenuIndexToCmd (const JIndex index, CmdIndex *cmd) const
 
bool SearchMenuCmdToIndex (const CmdIndex cmd, JIndex *index) const
 
bool HasSearchReplaceMenu () const
 
bool GetSearchReplaceMenu (JXTextMenu **menu) const
 
bool SearchReplaceMenuIndexToCmd (const JIndex index, CmdIndex *cmd) const
 
bool SearchReplaceMenuCmdToIndex (const CmdIndex cmd, JIndex *index) const
 
bool SearchForward (const bool reportNotFound=true)
 
bool SearchBackward ()
 
bool EnterSearchSelection ()
 
bool EnterReplaceSelection ()
 
bool SearchSelectionForward ()
 
bool SearchSelectionBackward ()
 
bool SearchClipboardForward ()
 
bool SearchClipboardBackward ()
 
bool ReplaceSelection ()
 
bool ReplaceAndSearchForward ()
 
bool ReplaceAndSearchBackward ()
 
bool ReplaceAll (const bool restrictToSelection)
 
bool TEHasSearchText () const override
 
void SetPSPrinter (JXPSPrinter *p)
 
const JStringGetPSPrintFileName () const
 
void SetPSPrintFileName (const JString &fileName)
 
void HandlePSPageSetup ()
 
void PrintPS ()
 
void SetPTPrinter (JXPTPrinter *p)
 
const JStringGetPTPrintFileName () const
 
void SetPTPrintFileName (const JString &fileName)
 
void HandlePTPageSetup ()
 
void PrintPT ()
 
void AskForLine ()
 
void MoveCaretToEdge (const JUtf8Character &c)
 
JCoordinate GetMinBoundsWidth () const
 
JCoordinate GetMinBoundsHeight () const
 
DisplayState SaveDisplayState () const
 
void RestoreDisplayState (const DisplayState &state)
 
JStringMatch SearchForward (const JRegex &regex, const bool entireWord, const bool wrapSearch, bool *wrapped)
 
bool SearchForward (std::function< bool(const JFont &)> match, const bool wrapSearch, bool *wrapped)
 
JStringMatch SearchBackward (const JRegex &regex, const bool entireWord, const bool wrapSearch, bool *wrapped)
 
bool SearchBackward (std::function< bool(const JFont &)> match, const bool wrapSearch, bool *wrapped)
 
- Public Member Functions inherited from JXScrollableWidget
 JXScrollableWidget (JXScrollbarSet *scrollbarSet, JXContainer *enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h)
 
 ~JXScrollableWidget () override
 
void AlwaysShowScrollbars (const bool alwaysShow=true)
 
bool GetScrollbars (JXScrollbar **hScrollbar, JXScrollbar **vScrollbar) const
 
void UpdateScrollbars ()
 
void ReadScrollSetup (std::istream &input)
 
void WriteScrollSetup (std::ostream &output) const
 
DisplayState SaveDisplayState () const
 
void RestoreDisplayState (const DisplayState &state)
 
- Public Member Functions inherited from JXWidget
 ~JXWidget () override
 
void Deactivate () override
 
void Refresh () const override
 
void RefreshRect (const JRect &rect) const
 
void Redraw () const override
 
void RedrawRect (const JRect &rect) const
 
bool Focus ()
 
bool Unfocus ()
 
bool HasFocus () const
 
bool WillAcceptFocus () const
 
void SetSingleFocusWidget ()
 
virtual bool OKToUnfocus ()
 
bool WantsTab () const
 
bool WantsModifiedTab () const
 
bool WillAcceptShortcut () const
 
JPoint GlobalToLocal (const JCoordinate x, const JCoordinate y) const override
 
JPoint LocalToGlobal (const JCoordinate x, const JCoordinate y) const override
 
void Place (const JCoordinate enclX, const JCoordinate enclY) override
 
void Move (const JCoordinate dx, const JCoordinate dy) override
 
void SetSize (const JCoordinate w, const JCoordinate h) override
 
void AdjustSize (const JCoordinate dw, const JCoordinate dh) override
 
HSizingOption GetHSizing () const
 
VSizingOption GetVSizing () const
 
void SetSizing (const HSizingOption hSizing, const VSizingOption vSizing)
 
void CenterWithinEnclosure (const bool adjustHoriz, const bool adjustVert)
 
void FitToEnclosure (const bool fitHoriz=true, const bool fitVert=true)
 
bool Scroll (const JCoordinate dx, const JCoordinate dy)
 
bool ScrollTo (const JCoordinate x, const JCoordinate y)
 
bool ScrollTo (const JPoint &pt)
 
bool ScrollToRect (const JRect &r)
 
bool ScrollToRectCentered (const JRect &r, const bool forceScroll)
 
JRect GetBoundsGlobal () const override
 
JRect GetFrameGlobal () const override
 
JRect GetApertureGlobal () const override
 
JSize GetBorderWidth () const
 
void SetBorderWidth (const JSize width)
 
JColorID GetCurrBackColor () const
 
JColorID GetBackColor () const
 
void SetBackColor (const JColorID color)
 
JColorID GetFocusColor () const
 
void SetFocusColor (const JColorID color)
 
JString ToString () const override
 
virtual JPoint GlobalToLocal (const JCoordinate x, const JCoordinate y) const=0
 
JPoint GlobalToLocal (const JPoint &pt) const
 
JRect GlobalToLocal (const JRect &r) const
 
virtual JPoint LocalToGlobal (const JCoordinate x, const JCoordinate y) const=0
 
JPoint LocalToGlobal (const JPoint &pt) const
 
JRect LocalToGlobal (const JRect &r) const
 
- Public Member Functions inherited from JXContainer
 ~JXContainer () override
 
bool IsAncestor (JXContainer *obj) const
 
virtual void Show ()
 
virtual void Hide ()
 
bool IsVisible () const
 
void SetVisible (const bool vis)
 
bool WouldBeVisible () const
 
bool IsActive () const
 
void SetActive (const bool active)
 
bool WouldBeActive () const
 
bool IsSuspended () const
 
bool IsDNDSource () const
 
bool IsDNDTarget () const
 
JPoint GlobalToLocal (const JPoint &pt) const
 
JRect GlobalToLocal (const JRect &r) const
 
JPoint LocalToGlobal (const JPoint &pt) const
 
JRect LocalToGlobal (const JRect &r) const
 
JRect GetBounds () const
 
JCoordinate GetBoundsWidth () const
 
JCoordinate GetBoundsHeight () const
 
JRect GetFrame () const
 
JRect GetFrameLocal () const
 
JCoordinate GetFrameWidth () const
 
JCoordinate GetFrameHeight () const
 
JRect GetAperture () const
 
JCoordinate GetApertureWidth () const
 
JCoordinate GetApertureHeight () const
 
JXDisplayGetDisplay () const
 
JXWindowGetWindow () const
 
JXContainerGetEnclosure () const
 
JFontManagerGetFontManager () const
 
JXFontManagerGetXFontManager () const
 
JXSelectionManagerGetSelectionManager () const
 
JXDNDManagerGetDNDManager () const
 
JXMenuManagerGetMenuManager () const
 
JCursorIndex GetDefaultCursor () const
 
bool GetHint (JString *text) const
 
void SetHint (const JString &text)
 
void ClearHint ()
 
bool GetVisibleRectGlobal (const JRect &origRectG, JRect *visRectG) const
 
void ForEach (const std::function< void(JXContainer *)> &f, const bool recurse)
 
void ForEach (const std::function< void(const JXContainer *)> &f, const bool recurse) const
 
void ExpandToFitContent ()
 
virtual bool RunInternalFTC (const bool horizontal, JCoordinate *newSize)
 
JRect ComputePaddingForInternalFTC () const
 
bool FindContainer (const JPoint &ptG, JXContainer **container) const
 
virtual bool IsMenu () const
 
virtual bool IsMenuTable () const
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (const JBroadcaster &source)
 
bool HasSenders () const
 
JSize GetSenderCount () const
 
bool HasRecipients () const
 
JSize GetRecipientCount () const
 
template<class T >
void ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f)
 
- Public Member Functions inherited from JTextEditor
 JTextEditor (const Type type, JStyledText *text, const bool ownsText, JFontManager *fontManager, const bool breakCROnly, const JColorID caretColor, const JColorID selectionColor, const JColorID outlineColor, const JColorID wsColor, const JCoordinate width)
 
 JTextEditor (const JTextEditor &source, JStyledText *text)
 
 ~JTextEditor () override
 
Type GetType () const
 
bool IsReadOnly () const
 
bool WillBreakCROnly () const
 
void SetBreakCROnly (const bool breakCROnly)
 
JStyledTextGetText ()
 
const JStyledTextGetText () const
 
JStringMatch SearchForward (const JRegex &regex, const bool entireWord, const bool wrapSearch, bool *wrapped)
 
JStringMatch SearchBackward (const JRegex &regex, const bool entireWord, const bool wrapSearch, bool *wrapped)
 
JStringMatch SelectionMatches (const JRegex &regex, const bool entireWord)
 
bool ReplaceAll (const JRegex &regex, const bool entireWord, const JString &replaceStr, JInterpolate *interpolator, const bool preserveCase, const bool restrictToSelection=false)
 
bool SearchForward (std::function< bool(const JFont &)> match, const bool wrapSearch, bool *wrapped)
 
bool SearchBackward (std::function< bool(const JFont &)> match, const bool wrapSearch, bool *wrapped)
 
JIndex GetInsertionCharIndex () const
 
JStringIteratorGetConstIteratorAtInsertionIndex () const
 
void DisposeConstIterator (JStringIterator *iter) const
 
bool GetCaretLocation (JIndex *charIndex) const
 
void SetCaretLocation (const JIndex charIndex)
 
void SetCaretLocation (const JPoint &pt)
 
bool HasSelection () const
 
bool GetSelection (JCharacterRange *range) const
 
bool GetSelection (JString *text) const
 
bool GetSelection (JString *text, JRunArray< JFont > *style) const
 
void SetSelection (const JCharacterRange &range, const bool needCaretBcast=true)
 
bool TEScrollToSelection (const bool centerInDisplay)
 
void GoToBeginningOfLine ()
 
void GoToEndOfLine ()
 
JFont GetCurrentFont () const
 
void SetCurrentFontName (const JString &name)
 
void SetCurrentFontSize (const JSize size)
 
void SetCurrentFontBold (const bool bold)
 
void SetCurrentFontItalic (const bool italic)
 
void SetCurrentFontUnderline (const JSize count)
 
void SetCurrentFontStrike (const bool strike)
 
void SetCurrentFontColor (const JColorID color)
 
void SetCurrentFontStyle (const JFontStyle &style)
 
void SetCurrentFont (const JFont &font)
 
bool CleanRightMargin (const bool coerce)
 
JCoordinate GetDefaultTabWidth () const
 
void SetDefaultTabWidth (const JCoordinate width)
 
void TabSelectionLeft (const JSize tabCount=1, const bool force=false)
 
void TabSelectionRight (const JSize tabCount=1)
 
void CleanAllWhitespace (const bool align)
 
void CleanSelectedWhitespace (const bool align)
 
void AnalyzeWhitespace (JSize *tabWidth)
 
bool WillShowWhitespace () const
 
void ShouldShowWhitespace (const bool show)
 
bool WillAlwaysShowSelection () const
 
void ShouldAlwaysShowSelection (const bool show)
 
bool WillMoveToFrontOfText () const
 
void ShouldMoveToFrontOfText (const bool moveToFront)
 
JSize GetLineCount () const
 
JIndex GetLineCharStart (const JIndex lineIndex) const
 
JIndex GetLineCharEnd (const JIndex lineIndex) const
 
JIndex GetLineForChar (const JIndex charIndex) const
 
void GoToLine (const JIndex lineIndex)
 
void SelectLine (const JIndex lineIndex)
 
JCoordinate GetLineTop (const JIndex lineIndex) const
 
JCoordinate GetLineBottom (const JIndex lineIndex) const
 
JSize GetLineHeight (const JIndex lineIndex) const
 
JIndex CRLineIndexToVisualLineIndex (const JIndex crLineIndex) const
 
JIndex VisualLineIndexToCRLineIndex (const JIndex visualLineIndex) const
 
JCoordinate GetCharLeft (const JIndex charIndex) const
 
JCoordinate GetCharRight (const JIndex charIndex) const
 
JIndex GetColumnForChar (const JIndex charIndex) const
 
void GoToColumn (const JIndex lineIndex, const JIndex columnIndex)
 
void DeleteSelection ()
 
void SelectAll ()
 
void Cut ()
 
void Copy () const
 
void Paste ()
 
void Paste (const JString &text, const JRunArray< JFont > *style=nullptr)
 
bool GetClipboard (JString *text, JRunArray< JFont > *style=nullptr) const
 
void Paginate (const JCoordinate pageHeight, JArray< JCoordinate > *breakpts) const
 
void Print (JPagePrinter &p)
 
JTEKeyHandlerGetKeyHandler () const
 
void SetKeyHandler (JTEKeyHandler *handler)
 
bool AllowsDragAndDrop () const
 
void ShouldAllowDragAndDrop (const bool allow)
 
JCoordinate TEGetMinPreferredGUIWidth () const
 
JCoordinate TEGetLeftMarginWidth () const
 
void TESetLeftMarginWidth (const JCoordinate width)
 
JColorID GetCaretColor () const
 
void SetCaretColor (const JColorID color)
 
JColorID GetSelectionColor () const
 
void SetSelectionColor (const JColorID color)
 
JColorID GetSelectionOutlineColor () const
 
void SetSelectionOutlineColor (const JColorID color)
 
JColorID GetWhitespaceColor () const
 
void SetWhitespaceColor (const JColorID color)
 
CaretMode GetCaretMode () const
 
void SetCaretMode (const CaretMode mode)
 
JFontManagerTEGetFontManager () const
 

Static Public Member Functions

static JXTextMenuStaticAppendEditMenu (JXMenuBar *menuBar, const bool showCheckSpellingCmds, const bool allowCheckSpelling, const bool showAdjustMarginsCmds, const bool allowAdjustMargins, const bool showCleanWhitespaceCmds, const bool allowCleanWhitespace, const bool showToggleReadOnly, const bool allowToggleReadOnly)
 
static PartialWordModifier GetPartialWordModifier ()
 
static void SetPartialWordModifier (const PartialWordModifier mod)
 
static bool CaretWillFollowScroll ()
 
static void CaretShouldFollowScroll (const bool follow)
 
static bool WillUseWindowsHomeEnd ()
 
static void ShouldUseWindowsHomeEnd (const bool use)
 
static bool MiddleButtonWillPaste ()
 
static void MiddleButtonShouldPaste (const bool paste)
 
- Static Public Member Functions inherited from JXScrollableWidget
static void SkipScrollSetup (std::istream &input)
 
- Static Public Member Functions inherited from JXContainer
static void DebugExpandToFitContent (const bool horiz)
 
static void DebugExpandToFitContentExtras (const bool noop, const bool overlap)
 
- Static Public Member Functions inherited from JTextEditor
static bool WillCopyWhenSelect ()
 
static void ShouldCopyWhenSelect (const bool copy)
 

Static Public Attributes

static const JUtf8BytekNoData = "NoData::JXTEBase"
 
static const JUtf8BytekDataNotCompatible = "DataNotCompatible::JXTEBase"
 
- Static Public Attributes inherited from JXWidget
static const JUtf8BytekGotFocus = "GotFocus::JXWidget"
 
static const JUtf8BytekLostFocus = "LostFocus::JXWidget"
 
- Static Public Attributes inherited from JTextEditor
static const JUtf8BytekTypeChanged = "TypeChanged::JTextEditor"
 
static const JUtf8BytekCaretLocationChanged = "CaretLocationChanged::JTextEditor"
 

Protected Member Functions

 JXTEBase (const Type type, JStyledText *text, const bool ownsText, const bool breakCROnly, JXScrollbarSet *scrollbarSet, JXContainer *enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h)
 
void Draw (JXWindowPainter &p, const JRect &rect) override
 
void HandleMouseEnter () override
 
void HandleMouseHere (const JPoint &pt, const JXKeyModifiers &modifiers) override
 
void HandleMouseLeave () override
 
void HandleMouseDown (const JPoint &pt, const JXMouseButton button, const JSize clickCount, const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers) override
 
void HandleMouseDrag (const JPoint &pt, const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers) override
 
void HandleMouseUp (const JPoint &pt, const JXMouseButton button, const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers) override
 
bool HitSamePart (const JPoint &pt1, const JPoint &pt2) const override
 
bool TEBeginDND () override
 
void DNDFinish (const bool isDrop, const JXContainer *target) override
 
Atom GetDNDAction (const JXContainer *target, const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers) override
 
void GetDNDAskActions (const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers, JArray< Atom > *askActionList, JPtrArray< JString > *askDescriptionList) override
 
void GetSelectionData (JXSelectionData *data, const JString &id) override
 
bool WillAcceptDrop (const JArray< Atom > &typeList, Atom *action, const JPoint &pt, const Time time, const JXWidget *source) override
 
void HandleDNDEnter () override
 
void HandleDNDHere (const JPoint &pt, const JXWidget *source) override
 
void HandleDNDLeave () override
 
void HandleDNDDrop (const JPoint &pt, const JArray< Atom > &typeList, const Atom action, const Time time, const JXWidget *source) override
 
void TEPasteDropData () override
 
virtual bool TEXWillAcceptDrop (const JArray< Atom > &typeList, const Atom action, const Time time, const JXWidget *source)
 
virtual bool TEXConvertDropData (const JArray< Atom > &typeList, const Atom action, const Time time, JString *text, JRunArray< JFont > *style)
 
void HandleFocusEvent () override
 
void HandleUnfocusEvent () override
 
void AdjustCursor (const JPoint &pt, const JXKeyModifiers &modifiers) override
 
void HandleWindowFocusEvent () override
 
void HandleWindowUnfocusEvent () override
 
void BoundsMoved (const JCoordinate dx, const JCoordinate dy) override
 
void ApertureResized (const JCoordinate dw, const JCoordinate dh) override
 
void TERefresh () override
 
void TERefreshRect (const JRect &rect) override
 
void TERedraw () override
 
void TESetGUIBounds (const JCoordinate w, const JCoordinate h, const JCoordinate changeY) override
 
bool TEWidthIsBeyondDisplayCapacity (const JSize width) const override
 
bool TEScrollToRect (const JRect &rect, const bool centerInDisplay) override
 
bool TEScrollForDrag (const JPoint &pt) override
 
bool TEScrollForDND (const JPoint &pt) override
 
void TESetVertScrollStep (const JCoordinate vStep) override
 
void TECaretShouldBlink (const bool blink) override
 
void TEUpdateClipboard (const JString &text, const JRunArray< JFont > &style) const override
 
bool TEGetClipboard (JString *text, JRunArray< JFont > *style) const override
 
JCoordinate GetPrintFooterHeight (JPagePrinter &p) const override
 
void DrawPrintFooter (JPagePrinter &p, const JCoordinate footerHeight) override
 
void Receive (JBroadcaster *sender, const Message &message) override
 
- Protected Member Functions inherited from JXScrollableWidget
bool ScrollForDrag (const JPoint &pt)
 
bool ScrollForWheel (const JXMouseButton button, const JXKeyModifiers &modifiers)
 
bool ScrollForWheel (const JXMouseButton button, const JXKeyModifiers &modifiers, JXScrollbar *hScrollbar, JXScrollbar *vScrollbar)
 
void SetHorizStepSize (const JCoordinate hStep)
 
void SetHorizPageStepContext (const JCoordinate hPageContext)
 
void SetVertStepSize (const JCoordinate vStep)
 
void SetVertPageStepContext (const JCoordinate vPageContext)
 
void SetHorizJumpToScrolltabModifiers (const bool ctrl, const bool meta)
 
void SetVertJumpToScrolltabModifiers (const bool ctrl, const bool meta)
 
void DrawBorder (JXWindowPainter &p, const JRect &frame) override
 
void BoundsResized (const JCoordinate dw, const JCoordinate dh) override
 
void ApertureMoved (const JCoordinate dx, const JCoordinate dy) override
 
void HandleDNDScroll (const JPoint &pt, const JXMouseButton scrollButton, const JXKeyModifiers &modifiers) override
 
- Protected Member Functions inherited from JXWidget
 JXWidget (JXContainer *enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h)
 
void WantInput (const bool wantInput, const bool wantTab=false, const bool wantModifiedTab=false)
 
void UnlockBounds ()
 
void SetBounds (const JCoordinate w, const JCoordinate h)
 
void AdjustBounds (const JCoordinate dw, const JCoordinate dh)
 
void DrawBackground (JXWindowPainter &p, const JRect &frame) override
 
bool AcceptDrag (const JPoint &pt, const JXMouseButton button, const JXKeyModifiers &modifiers) override
 
JXDragPainterCreateDragInsidePainter ()
 
JXDragPainterCreateDragOutsidePainter ()
 
bool GetDragPainter (JXDragPainter **p) const
 
bool GetDragPainter (JPainter **p) const
 
void DeleteDragPainter ()
 
void BoundsMoved (const JCoordinate dx, const JCoordinate dy) override
 
void EnclosingBoundsMoved (const JCoordinate dx, const JCoordinate dy) override
 
void BoundsResized (const JCoordinate dw, const JCoordinate dh) override
 
void EnclosingBoundsResized (const JCoordinate dw, const JCoordinate dh) override
 
void FTCAdjustSize (const JCoordinate dw, const JCoordinate dh) override
 
bool BeginDND (const JPoint &pt, const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers, JXSelectionData *data, JXDNDManager::TargetFinder *targetFinder=nullptr)
 
virtual void DNDInit (const JPoint &pt, const JXButtonStates &buttonStates, const JXKeyModifiers &modifiers)
 
virtual void DNDCompletelyFinished ()
 
virtual void HandleDNDResponse (const JXContainer *target, const bool dropAccepted, const Atom action)
 
bool WillAllowUnboundedScrolling () const
 
void ShouldAllowUnboundedScrolling (const bool allow)
 
- Protected Member Functions inherited from JXContainer
 JXContainer (JXWindow *window, JXContainer *enclosure)
 
 JXContainer (JXDisplay *display, JXWindow *window, JXContainer *enclosure)
 
void TurnOnBufferedDrawing ()
 
void DrawAll (JXWindowPainter &p, const JRect &frameG)
 
bool DispatchClientMessage (const XClientMessageEvent &clientMessage)
 
virtual bool HandleClientMessage (const XClientMessageEvent &clientMessage)
 
void NotifyBoundsMoved (const JCoordinate dx, const JCoordinate dy)
 
void NotifyBoundsResized (const JCoordinate dw, const JCoordinate dh)
 
virtual bool IncludeInFTC () const
 
virtual bool NeedsInternalFTC () const
 
virtual JCoordinate GetFTCMinContentSize (const bool horizontal) const
 
virtual JRect GetFrameForFTC () const
 
bool GetEnclosedObjects (JPtrArrayIterator< JXContainer > **iter) const
 
void DeleteEnclosedObjects ()
 
void ShowCursor ()
 
void HideCursor ()
 
void SetDefaultCursor (const JCursorIndex index)
 
void DispatchCursor (const JPoint &ptG, const JXKeyModifiers &modifiers)
 
void DisplayCursor (const JCursorIndex index)
 
JXCursorAnimatorCreateCursorAnimator ()
 
JXCursorAnimatorGetCursorAnimator () const
 
void AnimateCursor () const
 
void RemoveCursorAnimator ()
 
void ActivateCursor (const JPoint &ptG, const JXKeyModifiers &modifiers)
 
void DeactivateCursor ()
 
std::ostream & GetFTCLog () const
 
virtual bool StealMouse (const int eventType, const JPoint &ptG, const JXMouseButton button, const unsigned int state)
 
- Protected Member Functions inherited from JBroadcaster
 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)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
- Protected Member Functions inherited from JTextEditor
bool TEIsActive () const
 
void TEActivate ()
 
void TEDeactivate ()
 
bool TESelectionIsActive () const
 
void TEActivateSelection ()
 
void TEDeactivateSelection ()
 
bool TECaretIsVisible () const
 
void TEShowCaret ()
 
void TEHideCaret ()
 
void SetType (const Type type)
 
void RecalcAll (const bool broadcastCaretMessages=true)
 
JArray< boolGetCmdStatus (JString *crmActionText, JString *crm2ActionText, bool *isReadOnly) const
 
void TEDraw (JPainter &p, const JRect &rect)
 
virtual void TEDrawInMargin (JPainter &p, const JPoint &topLeft, const LineGeometry &geom, const JIndex lineIndex)
 
bool TEWillDragAndDrop (const JPoint &pt, const bool extendSelection, const bool dropCopy) const
 
void TEHandleMouseDown (const JPoint &pt, const JSize clickCount, const bool extendSelection, const bool partialWord)
 
void TEHandleMouseDrag (const JPoint &pt)
 
void TEHandleMouseUp ()
 
bool TEHitSamePart (const JPoint &pt1, const JPoint &pt2) const
 
void TEDNDFinished ()
 
void TEHandleDNDEnter ()
 
void TEHandleDNDHere (const JPoint &pt, const bool dropOnSelf)
 
void TEHandleDNDLeave ()
 
void TEHandleDNDDrop (const JPoint &pt, const bool dropOnSelf, const bool dropCopy)
 
bool TEIsDragging () const
 
bool TEHandleKeyPress (const JUtf8Character &key, const bool selectText, const CaretMotion motion, const bool deleteToTabStop)
 
JCoordinate TEGetBoundsWidth () const
 
void TESetBoundsWidth (const JCoordinate width)
 
void TERefreshLines (const JIndex first, const JIndex last)
 
virtual void TEUpdateDisplay ()
 
virtual JCoordinate GetTabWidth (const JIndex charIndex, const JCoordinate x) const
 
virtual JCoordinate GetPrintHeaderHeight (JPagePrinter &p) const
 
virtual void DrawPrintHeader (JPagePrinter &p, const JCoordinate headerHeight)
 
bool GetCaretLocation (CaretLocation *caretLoc) const
 
void SetCaretLocation (const JStyledText::TextIndex &caretLoc)
 
void SetCaretLocation (const CaretLocation &caretLoc)
 
CaretLocation CalcCaretLocation (const JPoint &pt) const
 
CaretLocation CalcCaretLocation (const JStyledText::TextIndex &index) const
 
bool PointInSelection (const JPoint &pt) const
 
void MoveCaretVert (const JInteger deltaLines)
 
JIndex GetColumnForChar (const CaretLocation &caretLoc) const
 
JStyledText::TextIndex GetInsertionIndex () const
 
JStyledText::TextIndex GetLineStart (const JIndex lineIndex) const
 
JStyledText::TextIndex GetLineEnd (const JIndex lineIndex) const
 
JStyledText::TextCount GetLineLength (const JIndex lineIndex) const
 
bool GetSelection (JStyledText::TextRange *range) const
 
void SetSelection (const JStyledText::TextRange &range, const bool needCaretBcast=true, const bool ignoreCopyWhenSelect=false)
 
void TEGetDoubleClickSelection (const JStyledText::TextIndex &charIndex, const bool partialWord, const bool dragging, JStyledText::TextRange *range) const
 
void SetAllFontNameAndSize (const JString &name, const JSize size, const JCoordinate tabWidth, const bool breakCROnly, const bool clearUndo)
 
void ReplaceSelection (const JStringMatch &match, const JString &replaceStr, JInterpolate *interpolator, const bool preserveCase)
 
void ReceiveGoingAway (JBroadcaster *sender) override
 

Friends

class JXTEBlinkCaretTask
 
class JXSpellCheckerDialog
 

Detailed Description

We implement the routines required by JTextEditor that depend on JX.

We accept the following data types:
    XA_STRING, UTF8_STRING,
    text/plain, text/plain;charset=utf-8,
    text/x-jxstyled0

To paste other formats, override TEGetClipboard().

To accept drops of other formats that can be pasted (and should therefore
    display an insertion caret), override TEXWillAcceptDrop() and
    TEXConvertDropData().

To accept drops of other formats that cannot be pasted, override
    WillAcceptDrop() and -all- four HandleDND*() functions.

Member Enumeration Documentation

◆ PartialWordModifier

Enumerator
kCtrlMetaPWMod 
kMod2PWMod 
kMod3PWMod 
kMod4PWMod 
kMod5PWMod 

Constructor & Destructor Documentation

◆ ~JXTEBase()

JXTEBase::~JXTEBase ( )
override

◆ JXTEBase()

JXTEBase::JXTEBase ( const Type  type,
JStyledText text,
const bool  ownsText,
const bool  breakCROnly,
JXScrollbarSet scrollbarSet,
JXContainer enclosure,
const HSizingOption  hSizing,
const VSizingOption  vSizing,
const JCoordinate  x,
const JCoordinate  y,
const JCoordinate  w,
const JCoordinate  h 
)
protected

Member Function Documentation

◆ Activate()

void JXTEBase::Activate ( )
overridevirtual

Reimplemented from JXContainer.

◆ AdjustCursor()

void JXTEBase::AdjustCursor ( const JPoint pt,
const JXKeyModifiers modifiers 
)
overrideprotectedvirtual

Show the default cursor during drag-and-drop.

Reimplemented from JXContainer.

◆ ApertureResized()

void JXTEBase::ApertureResized ( const JCoordinate  dw,
const JCoordinate  dh 
)
overrideprotectedvirtual

Reimplemented from JXScrollableWidget.

◆ AppendEditMenu()

JXTextMenu * JXTEBase::AppendEditMenu ( JXMenuBar menuBar,
const bool  showCheckSpellingCmds = false,
const bool  allowCheckSpelling = false,
const bool  showAdjustMarginsCmds = false,
const bool  allowAdjustMargins = false,
const bool  showCleanWhitespaceCmds = false,
const bool  allowCleanWhitespace = false,
const bool  showToggleReadOnly = false,
const bool  allowToggleReadOnly = false 
)

Call this to let us create the Edit menu for text editing.

◆ AppendSearchMenu()

JXTextMenu * JXTEBase::AppendSearchMenu ( JXMenuBar menuBar)

Call this to let us create the Search menu for text editing.

This cannot be used if a Search & Replace menu already exists.

◆ AppendSearchReplaceMenu()

JXTextMenu * JXTEBase::AppendSearchReplaceMenu ( JXMenuBar menuBar)

Call this to let us create the Search & Replace menu for text editing.

This cannot be used if a Search menu already exists.

◆ AskForLine()

void JXTEBase::AskForLine ( )

Opens dialog window to ask user which line to go to.

◆ BoundsMoved()

void JXTEBase::BoundsMoved ( const JCoordinate  dx,
const JCoordinate  dy 
)
overrideprotectedvirtual

Reimplemented from JXScrollableWidget.

◆ CaretShouldFollowScroll()

void JXTEBase::CaretShouldFollowScroll ( const bool  follow)
inlinestatic

◆ CaretWillFollowScroll()

bool JXTEBase::CaretWillFollowScroll ( )
inlinestatic

◆ Deactivate()

void JXTEBase::Deactivate ( )
overridevirtual

Reimplemented from JXContainer.

◆ DNDFinish()

void JXTEBase::DNDFinish ( const bool  isDrop,
const JXContainer target 
)
overrideprotectedvirtual

This is called when DND is terminated, but before the actual data transfer.

If it is not a drop, or the drop target is not within the same application, target is nullptr.

Reimplemented from JXWidget.

◆ Draw()

void JXTEBase::Draw ( JXWindowPainter p,
const JRect rect 
)
overrideprotectedvirtual

Implements JXContainer.

◆ DrawPrintFooter()

void JXTEBase::DrawPrintFooter ( JPagePrinter p,
const JCoordinate  footerHeight 
)
overrideprotectedvirtual

Reimplemented from JTextEditor.

◆ EditMenuCmdToIndex()

bool JXTEBase::EditMenuCmdToIndex ( const CmdIndex  cmd,
JIndex index 
) const

◆ EditMenuIndexToCmd()

bool JXTEBase::EditMenuIndexToCmd ( const JIndex  index,
CmdIndex cmd 
) const

◆ EnterReplaceSelection()

bool JXTEBase::EnterReplaceSelection ( )

Copy the selection into the replace field of the SearchTextDialog. Returns true if there was something selected.

◆ EnterSearchSelection()

bool JXTEBase::EnterSearchSelection ( )

Copy the selection into the search field of the SearchTextDialog. Returns true if there was something selected.

◆ GetDNDAction()

Atom JXTEBase::GetDNDAction ( const JXContainer target,
const JXButtonStates buttonStates,
const JXKeyModifiers modifiers 
)
overrideprotectedvirtual

This is called repeatedly during the drag so the drop action can be changed based on the current target, buttons, and modifier keys.

Reimplemented from JXWidget.

◆ GetDNDAskActions()

void JXTEBase::GetDNDAskActions ( const JXButtonStates buttonStates,
const JXKeyModifiers modifiers,
JArray< Atom > *  askActionList,
JPtrArray< JString > *  askDescriptionList 
)
overrideprotectedvirtual

This is called when the value returned by GetDNDAction() changes to XdndActionAsk. If GetDNDAction() repeatedly returns XdndActionAsk, this function is not called again because it is assumed that the actions are the same within a single DND session.

This function must place at least 2 elements in askActionList and askDescriptionList.

The first element should be the default action.

Reimplemented from JXWidget.

◆ GetEditMenu()

bool JXTEBase::GetEditMenu ( JXTextMenu **  menu) const
inline

◆ GetMinBoundsHeight()

JCoordinate JXTEBase::GetMinBoundsHeight ( ) const
inline

◆ GetMinBoundsWidth()

JCoordinate JXTEBase::GetMinBoundsWidth ( ) const
inline

This is useful because we keep JXWidget::bounds large enough to fill the aperture.

◆ GetPartialWordModifier()

JXTEBase::PartialWordModifier JXTEBase::GetPartialWordModifier ( )
inlinestatic

◆ GetPrintFooterHeight()

JCoordinate JXTEBase::GetPrintFooterHeight ( JPagePrinter p) const
overrideprotectedvirtual

Overrides of JTextEditor functions.

Reimplemented from JTextEditor.

◆ GetPSPrintFileName()

const JString & JXTEBase::GetPSPrintFileName ( ) const

Call this to get the file name used in the Print Setup dialog.

◆ GetPTPrintFileName()

const JString & JXTEBase::GetPTPrintFileName ( ) const

Call this to get the file name used in the Print Setup dialog.

◆ GetSearchMenu()

bool JXTEBase::GetSearchMenu ( JXTextMenu **  menu) const
inline

◆ GetSearchReplaceMenu()

bool JXTEBase::GetSearchReplaceMenu ( JXTextMenu **  menu) const
inline

◆ GetSelectionData()

void JXTEBase::GetSelectionData ( JXSelectionData data,
const JString id 
)
overrideprotectedvirtual

This is called when DND is terminated by a drop or when the target requests the data during a drag, but only if the delayed evaluation constructor for JXSelectionData was used.

id is the string passed to the JXSelectionData constructor.

Reimplemented from JXWidget.

◆ HandleDNDDrop()

void JXTEBase::HandleDNDDrop ( const JPoint pt,
const JArray< Atom > &  typeList,
const Atom  action,
const Time  time,
const JXWidget source 
)
overrideprotectedvirtual

This is called when the data is dropped. The data is accessed via the selection manager, just like Paste.

Reimplemented from JXContainer.

◆ HandleDNDEnter()

void JXTEBase::HandleDNDEnter ( )
overrideprotectedvirtual

This is called when the mouse enters the widget.

Reimplemented from JXContainer.

◆ HandleDNDHere()

void JXTEBase::HandleDNDHere ( const JPoint pt,
const JXWidget source 
)
overrideprotectedvirtual

This is called while the mouse is inside the widget.

Reimplemented from JXContainer.

◆ HandleDNDLeave()

void JXTEBase::HandleDNDLeave ( )
overrideprotectedvirtual

This is called when the mouse leaves the widget without dropping data.

Reimplemented from JXContainer.

◆ HandleFocusEvent()

void JXTEBase::HandleFocusEvent ( )
overrideprotectedvirtual

Reimplemented from JXWidget.

Reimplemented in JXTextEditor.

◆ HandleKeyPress()

void JXTEBase::HandleKeyPress ( const JUtf8Character c,
const int  origKeySym,
const JXKeyModifiers origModifiers 
)
overridevirtual

We handle all the edit shortcuts here because we won't always have an Edit menu.

Reimplemented from JXScrollableWidget.

◆ HandleMouseDown()

void JXTEBase::HandleMouseDown ( const JPoint pt,
const JXMouseButton  button,
const JSize  clickCount,
const JXButtonStates buttonStates,
const JXKeyModifiers modifiers 
)
overrideprotectedvirtual

The default is to support scrolling via a wheel mouse.

Reimplemented from JXScrollableWidget.

◆ HandleMouseDrag()

void JXTEBase::HandleMouseDrag ( const JPoint pt,
const JXButtonStates buttonStates,
const JXKeyModifiers modifiers 
)
overrideprotectedvirtual

Reimplemented from JXContainer.

◆ HandleMouseEnter()

void JXTEBase::HandleMouseEnter ( )
overrideprotectedvirtual

Reimplemented from JXContainer.

◆ HandleMouseHere()

void JXTEBase::HandleMouseHere ( const JPoint pt,
const JXKeyModifiers modifiers 
)
overrideprotectedvirtual

Reimplemented from JXContainer.

◆ HandleMouseLeave()

void JXTEBase::HandleMouseLeave ( )
overrideprotectedvirtual

Reimplemented from JXContainer.

◆ HandleMouseUp()

void JXTEBase::HandleMouseUp ( const JPoint pt,
const JXMouseButton  button,
const JXButtonStates buttonStates,
const JXKeyModifiers modifiers 
)
overrideprotectedvirtual

Reimplemented from JXContainer.

◆ HandlePSPageSetup()

void JXTEBase::HandlePSPageSetup ( )

You must call SetPSPrinter() before using this routine.

◆ HandlePTPageSetup()

void JXTEBase::HandlePTPageSetup ( )

You must call SetPTPrinter() before using this routine.

◆ HandleShortcut()

void JXTEBase::HandleShortcut ( const int  key,
const JXKeyModifiers modifiers 
)
overridevirtual

Reimplemented from JXWidget.

◆ HandleUnfocusEvent()

void JXTEBase::HandleUnfocusEvent ( )
overrideprotectedvirtual

Reimplemented from JXWidget.

◆ HandleWindowFocusEvent()

void JXTEBase::HandleWindowFocusEvent ( )
overrideprotectedvirtual

Reimplemented from JXWidget.

◆ HandleWindowUnfocusEvent()

void JXTEBase::HandleWindowUnfocusEvent ( )
overrideprotectedvirtual

Reimplemented from JXWidget.

◆ HasEditMenu()

bool JXTEBase::HasEditMenu ( ) const
inline

◆ HasSearchMenu()

bool JXTEBase::HasSearchMenu ( ) const
inline

◆ HasSearchReplaceMenu()

bool JXTEBase::HasSearchReplaceMenu ( ) const
inline

◆ HitSamePart()

bool JXTEBase::HitSamePart ( const JPoint pt1,
const JPoint pt2 
) const
overrideprotectedvirtual

This default implementation always returns true.

Reimplemented from JXContainer.

◆ MiddleButtonShouldPaste()

void JXTEBase::MiddleButtonShouldPaste ( const bool  paste)
inlinestatic

◆ MiddleButtonWillPaste()

bool JXTEBase::MiddleButtonWillPaste ( )
inlinestatic

◆ MoveCaretToEdge()

void JXTEBase::MoveCaretToEdge ( const JUtf8Character c)

key can be either kJUpArrow or kJDownArrow.

◆ PrintPS()

void JXTEBase::PrintPS ( )

You must call SetPSPrinter() before using this routine.

◆ PrintPT()

void JXTEBase::PrintPT ( )

You must call SetPTPrinter() before using this routine.

◆ Receive()

void JXTEBase::Receive ( JBroadcaster sender,
const Message message 
)
overrideprotectedvirtual

Listen for menu update requests and menu selections.

Reimplemented from JXScrollableWidget.

Reimplemented in JXTextEditor.

◆ ReplaceAll()

bool JXTEBase::ReplaceAll ( const bool  restrictToSelection)

Replace every occurrence of the search string with the replace string. Returns true if it replaced anything.

◆ ReplaceAndSearchBackward()

bool JXTEBase::ReplaceAndSearchBackward ( )
inline

◆ ReplaceAndSearchForward()

bool JXTEBase::ReplaceAndSearchForward ( )
inline

◆ ReplaceSelection()

bool JXTEBase::ReplaceSelection ( )

Replace the current selection with the replace string from the SearchTextDialog. Returns false if nothing is selected or if the current selection doesn't match the search string.

◆ RestoreDisplayState()

void JXTEBase::RestoreDisplayState ( const DisplayState state)

Restore the selection and scrollbar positions.

Cannot be virtual because derived class must use layered type.

◆ Resume()

void JXTEBase::Resume ( )
overridevirtual

Reimplemented from JXContainer.

◆ SaveDisplayState()

JXTEBase::DisplayState JXTEBase::SaveDisplayState ( ) const

Save the selection and scrollbar positions.

Cannot be virtual because derived class must use layered type.

◆ SearchBackward() [1/3]

bool JXTEBase::SearchBackward ( )

Get the search parameters from the search dialog and look for the match before the current position. We beep if we can't find a match.

◆ SearchBackward() [2/3]

JStringMatch JTextEditor::SearchBackward ( const JRegex regex,
const bool  entireWord,
const bool  wrapSearch,
bool wrapped 
)

Look for the match before the current position. If we find it, we select it and return true.

◆ SearchBackward() [3/3]

bool JTextEditor::SearchBackward ( std::function< bool(const JFont &)>  match,
const bool  wrapSearch,
bool wrapped 
)

Look for the match before the current position. If we find it, we select it and return true.

◆ SearchClipboardBackward()

bool JXTEBase::SearchClipboardBackward ( )

◆ SearchClipboardForward()

bool JXTEBase::SearchClipboardForward ( )

◆ SearchForward() [1/3]

bool JXTEBase::SearchForward ( const bool  reportNotFound = true)

Get the search parameters from the search dialog and look for the next match beyond the current position. We beep if we can't find a match.

◆ SearchForward() [2/3]

JStringMatch JTextEditor::SearchForward ( const JRegex regex,
const bool  entireWord,
const bool  wrapSearch,
bool wrapped 
)

We only support regular expressions because there is no advantage in optimizing for literal strings. Look for the next match beyond the current position. If we find it, we select it and return true.

◆ SearchForward() [3/3]

bool JTextEditor::SearchForward ( std::function< bool(const JFont &)>  match,
const bool  wrapSearch,
bool wrapped 
)

Look for the next match beyond the current position. If we find it, we select it and return true.

◆ SearchMenuCmdToIndex()

bool JXTEBase::SearchMenuCmdToIndex ( const CmdIndex  cmd,
JIndex index 
) const

◆ SearchMenuIndexToCmd()

bool JXTEBase::SearchMenuIndexToCmd ( const JIndex  index,
CmdIndex cmd 
) const

◆ SearchReplaceMenuCmdToIndex()

bool JXTEBase::SearchReplaceMenuCmdToIndex ( const CmdIndex  cmd,
JIndex index 
) const

◆ SearchReplaceMenuIndexToCmd()

bool JXTEBase::SearchReplaceMenuIndexToCmd ( const JIndex  index,
CmdIndex cmd 
) const

◆ SearchSelectionBackward()

bool JXTEBase::SearchSelectionBackward ( )
inline

◆ SearchSelectionForward()

bool JXTEBase::SearchSelectionForward ( )
inline

◆ SetPartialWordModifier()

void JXTEBase::SetPartialWordModifier ( const PartialWordModifier  mod)
inlinestatic

◆ SetPSPrinter()

void JXTEBase::SetPSPrinter ( JXPSPrinter p)

Call this to provide a JXPSPrinter object for this text. This object does not take ownership of the printer object.

◆ SetPSPrintFileName()

void JXTEBase::SetPSPrintFileName ( const JString fileName)

Call this to set the file name used in the Print Setup dialog.

◆ SetPTPrinter()

void JXTEBase::SetPTPrinter ( JXPTPrinter p)

Call this to provide a JXPTPrinter object for this text. This object does not take ownership of the printer object.

◆ SetPTPrintFileName()

void JXTEBase::SetPTPrintFileName ( const JString fileName)

Call this to set the file name used in the Print Setup dialog.

◆ ShareEditMenu() [1/2]

JXTextMenu * JXTEBase::ShareEditMenu ( JXTEBase te,
const bool  allowCheckSpelling = false,
const bool  allowAdjustMargins = false,
const bool  allowCleanWhitespace = false,
const bool  allowToggleReadOnly = false 
)

Call this to let us share the Edit menu with other objects.

The JXTextMenu passed to the second version must have ID's assigned to the standard items: Undo, Redo, Cut, Copy, Paste, Clear, Select All

◆ ShareEditMenu() [2/2]

void JXTEBase::ShareEditMenu ( JXTextMenu menu,
const bool  allowCheckSpelling = false,
const bool  allowAdjustMargins = false,
const bool  allowCleanWhitespace = false,
const bool  allowToggleReadOnly = false 
)

◆ ShareSearchMenu() [1/2]

JXTextMenu * JXTEBase::ShareSearchMenu ( JXTEBase te)

Call this to let us share the Search or Search & Replace menu with other objects.

The JXTextMenu passed to the versions taking JXTextMenu* must have ID's assigned to the standard items.

◆ ShareSearchMenu() [2/2]

void JXTEBase::ShareSearchMenu ( JXTextMenu menu)

◆ ShareSearchReplaceMenu()

void JXTEBase::ShareSearchReplaceMenu ( JXTextMenu menu)

◆ ShouldUseWindowsHomeEnd()

void JXTEBase::ShouldUseWindowsHomeEnd ( const bool  use)
inlinestatic

◆ StaticAppendEditMenu()

JXTextMenu * JXTEBase::StaticAppendEditMenu ( JXMenuBar menuBar,
const bool  showCheckSpellingCmds,
const bool  allowCheckSpelling,
const bool  showAdjustMarginsCmds,
const bool  allowAdjustMargins,
const bool  showCleanWhitespaceCmds,
const bool  allowCleanWhitespace,
const bool  showToggleReadOnly,
const bool  allowToggleReadOnly 
)
static

◆ Suspend()

void JXTEBase::Suspend ( )
overridevirtual

Reimplemented from JXContainer.

◆ TEBeginDND()

bool JXTEBase::TEBeginDND ( )
overrideprotectedvirtual

Implements JTextEditor.

◆ TECaretShouldBlink()

void JXTEBase::TECaretShouldBlink ( const bool  blink)
overrideprotectedvirtual

Implements JTextEditor.

◆ TEGetClipboard()

bool JXTEBase::TEGetClipboard ( JString text,
JRunArray< JFont > *  style 
) const
overrideprotectedvirtual

Returns true if there is something pasteable on the system clipboard.

Implements JTextEditor.

◆ TEHasSearchText()

bool JXTEBase::TEHasSearchText ( ) const
overridevirtual

Implements JTextEditor.

◆ TEPasteDropData()

void JXTEBase::TEPasteDropData ( )
overrideprotectedvirtual

Get the data that was dropped and paste it in.

Implements JTextEditor.

◆ TERedraw()

void JXTEBase::TERedraw ( )
overrideprotectedvirtual

Not inline because it is virtual.

Implements JTextEditor.

◆ TERefresh()

void JXTEBase::TERefresh ( )
overrideprotectedvirtual

Not inline because it is virtual.

Implements JTextEditor.

◆ TERefreshRect()

void JXTEBase::TERefreshRect ( const JRect rect)
overrideprotectedvirtual

Not inline because it is virtual.

Implements JTextEditor.

◆ TEScrollForDND()

bool JXTEBase::TEScrollForDND ( const JPoint pt)
overrideprotectedvirtual

Not inline because it is virtual.

Implements JTextEditor.

◆ TEScrollForDrag()

bool JXTEBase::TEScrollForDrag ( const JPoint pt)
overrideprotectedvirtual

Not inline because it is virtual.

Implements JTextEditor.

◆ TEScrollToRect()

bool JXTEBase::TEScrollToRect ( const JRect rect,
const bool  centerInDisplay 
)
overrideprotectedvirtual

Implements JTextEditor.

◆ TESetGUIBounds()

void JXTEBase::TESetGUIBounds ( const JCoordinate  w,
const JCoordinate  h,
const JCoordinate  changeY 
)
overrideprotectedvirtual

Keep the bounds at least as large as the aperture.

Implements JTextEditor.

◆ TESetVertScrollStep()

void JXTEBase::TESetVertScrollStep ( const JCoordinate  vStep)
overrideprotectedvirtual

Implements JTextEditor.

◆ TEUpdateClipboard()

void JXTEBase::TEUpdateClipboard ( const JString text,
const JRunArray< JFont > &  style 
) const
overrideprotectedvirtual

Implements JTextEditor.

◆ TEWidthIsBeyondDisplayCapacity()

bool JXTEBase::TEWidthIsBeyondDisplayCapacity ( const JSize  width) const
overrideprotectedvirtual

Implements JTextEditor.

◆ TEXConvertDropData()

bool JXTEBase::TEXConvertDropData ( const JArray< Atom > &  typeList,
const Atom  action,
const Time  time,
JString text,
JRunArray< JFont > *  style 
)
protectedvirtual

Derived classes can override this to convert other data types into text and styles that can be pasted. Return true to paste the contents of text and style. To paste unstyled text, leave style empty.

This function will only be called if the derived class implemented TEXWillAcceptDrop() and returned true.

◆ TEXWillAcceptDrop()

bool JXTEBase::TEXWillAcceptDrop ( const JArray< Atom > &  typeList,
const Atom  action,
const Time  time,
const JXWidget source 
)
protectedvirtual

Derived classes can override this to accept other data types that can be pasted. Returning true guarantees that TEXConvertDropData() will be called, and this can be used to accept a different data type even when one of the default types (e.g. text/plain) is available.

Data types that cannot be pasted must be implemented by overriding WillAcceptDrop() and -all- four HandleDND*() functions.

When overriding this function, derived classes must also override TEXConvertDropData() to process the actual data that is dropped.

source is non-nullptr if the drag is between widgets in the same program. This provides a way for compound documents to identify drags between their various parts.

◆ WillAcceptDrop()

bool JXTEBase::WillAcceptDrop ( const JArray< Atom > &  typeList,
Atom *  action,
const JPoint pt,
const Time  time,
const JXWidget source 
)
overrideprotectedvirtual

Derived classes that accept drops should override this function and return true if they will accept the current drop. If they return false, they will not receive any DND messages.

source is non-nullptr if the drag is between widgets in the same program. This provides a way for compound documents to identify drags between their various parts.

Reimplemented from JXContainer.

◆ WillUseWindowsHomeEnd()

bool JXTEBase::WillUseWindowsHomeEnd ( )
inlinestatic

Friends And Related Symbol Documentation

◆ JXSpellCheckerDialog

friend class JXSpellCheckerDialog
friend

◆ JXTEBlinkCaretTask

friend class JXTEBlinkCaretTask
friend

Member Data Documentation

◆ kDataNotCompatible

const JUtf8Byte * JXTEBase::kDataNotCompatible = "DataNotCompatible::JXTEBase"
static

◆ kNoData

const JUtf8Byte * JXTEBase::kNoData = "NoData::JXTEBase"
static

The documentation for this class was generated from the following files: