2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * $XConsortium: WXmText.h /main/3 1996/06/11 17:02:41 cde-hal $
26 * Copyright (c) 1991 HaL Computer Systems, Inc. All rights reserved.
27 * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
28 * States. Use of a copyright notice is precautionary only and does not
29 * imply publication or disclosure.
31 * This software contains confidential information and trade secrets of HaL
32 * Computer Systems, Inc. Use, disclosure, or reproduction is prohibited
33 * without the prior express written permission of HaL Computer Systems, Inc.
35 * RESTRICTED RIGHTS LEGEND
36 * Use, duplication, or disclosure by the Government is subject to
37 * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
38 * Technical Data and Computer Software clause at DFARS 252.227-7013.
39 * HaL Computer Systems, Inc.
40 * 1315 Dell Avenue, Campbell, CA 95008
44 // This code is automatically generated in -*- C++ -*-
48 #include "WXmPrimitive.h"
51 class WXmText : public WXmPrimitive {
53 DEFINE_INIT (WXmText, WXmPrimitive, xmTextWidgetClass)
54 inline void ClearSelection(Time t) const { XmTextClearSelection (widget, t); }
55 inline Boolean Copy (Time copy_time) const { return XmTextCopy (widget, copy_time); }
56 inline Boolean Cut (Time cut_time) const { return XmTextCut (widget, cut_time); }
57 inline Boolean GetAddMode () const { return XmTextGetAddMode (widget); }
58 inline int GetBaseline () const { return XmTextGetBaseline (widget); }
59 // Non-published routine. Use GetInsertionPosition. DJB
60 // inline XmTextPosition GetCursorPosition () const { return XmTextGetCursorPosition (widget); }
61 inline Boolean GetEditable () const { return XmTextGetEditable (widget); }
62 inline XmTextPosition GetInsertionPosition () const { return XmTextGetInsertionPosition (widget); }
63 inline XmTextPosition GetLastPosition () const { return XmTextGetLastPosition (widget); }
64 inline XmTextPosition LastPosition () const { return XmTextGetLastPosition (widget); }
65 inline int GetMaxLength () const { return XmTextGetMaxLength (widget); }
66 inline char* GetSelection () const { return XmTextGetSelection (widget); }
67 inline Boolean GetSelectionPosition (XmTextPosition* left, XmTextPosition* right) const { return XmTextGetSelectionPosition (widget, left, right); }
68 inline XmTextSource GetSource () const { return XmTextGetSource (widget); }
69 inline char* GetString () const { return XmTextGetString (widget); }
70 inline XmTextPosition GetTopCharacter () const { return XmTextGetTopCharacter (widget); }
71 inline void Insert (XmTextPosition position, char* value) const { XmTextInsert (widget, position, value); }
72 inline Boolean Paste (Widget twidget) const { return XmTextPaste (twidget); }
73 inline Boolean PosToXY (XmTextPosition position, Position* x, Position* y) const { return XmTextPosToXY (widget, position, x, y); }
74 inline Boolean Remove () const { return XmTextRemove (widget); }
75 inline void Replace (XmTextPosition from, XmTextPosition to, char* s) const { XmTextReplace (widget, from, to, s); }
76 inline void Scroll (int n) const { XmTextScroll (widget, n); }
77 inline void SetAddMode (Boolean state) const { XmTextSetAddMode (widget, state); }
78 // Non-published routine, use SetInsertionPosition - DJB
79 // inline void SetCursorPosition (XmTextPosition position) const { XmTextSetCursorPosition (widget, position); }
80 inline void SetEditable (Boolean editable) const { XmTextSetEditable (widget, editable); }
81 inline void SetHighlight (XmTextPosition left, XmTextPosition right, XmHighlightMode mode) const { XmTextSetHighlight (widget, left, right, mode); }
82 inline void SetInsertionPosition (XmTextPosition position) const { XmTextSetInsertionPosition (widget, position); }
83 inline void InsertionPosition (XmTextPosition position) const { XmTextSetInsertionPosition (widget, position); }
84 inline void SetMaxLength (int max_length) const { XmTextSetMaxLength (widget, max_length); }
85 inline void SetSelection (XmTextPosition first, XmTextPosition last, Time set_time) const { XmTextSetSelection (widget, first, last, set_time); }
86 inline void SetSource (XmTextSource source, XmTextPosition top_character, XmTextPosition cursor_position) const { XmTextSetSource (widget, source, top_character, cursor_position); }
87 inline void SetString(char* str) const { XmTextSetString (widget, str); }
88 inline void SetTopCharacter (XmTextPosition top_character) const { XmTextSetTopCharacter (widget, top_character); }
89 inline void ShowPosition (XmTextPosition position) const { XmTextShowPosition (widget, position); }
90 inline XmTextPosition XYToPos (Position x, Position y) const { return XmTextXYToPos (widget, x, y); }
91 DEFINE_CALLBACK (ActivateCallback,"activateCallback")
92 DEFINE_GETTER_SETTER (AutoShowCursorPosition,Boolean,"autoShowCursorPosition")
93 DEFINE_GETTER_SETTER (CursorPosition,XmTextPosition,"cursorPosition")
94 DEFINE_GETTER_SETTER (Editable,Boolean,"editable")
95 DEFINE_GETTER_SETTER (EditMode,unsigned char,"editMode")
96 DEFINE_CALLBACK (FocusCallback,"focusCallback")
97 DEFINE_CALLBACK (LosingFocusCallback,"losingFocusCallback")
98 DEFINE_CALLBACK (GainPrimaryCallback,"gainPrimaryCallback")
99 DEFINE_CALLBACK (LosePrimaryCallback,"losePrimaryCallback")
100 DEFINE_GETTER_SETTER (MarginHeight,short,"marginHeight")
101 DEFINE_GETTER_SETTER (MarginWidth,short,"marginWidth")
102 DEFINE_GETTER_SETTER (MaxLength,int,"maxLength")
103 DEFINE_CALLBACK (ModifyVerifyCallback,"modifyVerifyCallback")
104 DEFINE_CALLBACK (MotionVerifyCallback,"motionVerifyCallback")
105 DEFINE_GETTER_SETTER (Source,XmTextSource,"source")
106 DEFINE_GETTER_SETTER (TopCharacter,XmTextPosition,"topCharacter")
107 DEFINE_GETTER_SETTER (Value,char *,"value")
108 DEFINE_CALLBACK (ValueChangedCallback,"valueChangedCallback")
109 DEFINE_GETTER_SETTER (VerifyBell,Boolean,"verifyBell")
111 DEFINE_GETTER_SETTER (PendingDelete,Boolean,"pendingDelete")
112 DEFINE_GETTER_SETTER (SelectionArray,XtPointer,"selectionArray")
113 DEFINE_GETTER_SETTER (SelectionArrayCount,int,"selectionArrayCount")
114 DEFINE_GETTER_SETTER (SelectThreshold,int,"selectThreshold")
116 DEFINE_GETTER_SETTER (BlinkRate,int,"blinkRate")
117 DEFINE_GETTER_SETTER (Columns,short,"columns")
118 DEFINE_GETTER_SETTER (CursorPositionVisible,Boolean,"cursorPositionVisible")
119 DEFINE_GETTER_SETTER (FontList,XmFontList,"fontList")
120 DEFINE_GETTER_SETTER (ResizeHeight,Boolean,"resizeHeight")
121 DEFINE_GETTER_SETTER (ResizeWidth,Boolean,"resizeWidth")
122 DEFINE_GETTER_SETTER (Rows,short,"rows")
123 DEFINE_GETTER_SETTER (WordWrap,Boolean,"wordWrap")
124 // Scrolled text resources
125 DEFINE_GETTER_SETTER (ScrollHorizontal,Boolean,"scrollHorizontal")
126 DEFINE_GETTER_SETTER (ScrollLeftSide,Boolean,"scrollLeftSide")
127 DEFINE_GETTER_SETTER (ScrollTopSide,Boolean,"scrollTopSide")
128 DEFINE_GETTER_SETTER (ScrollVertical,Boolean,"scrollVertical")
130 DEFINE_GETTER_SETTER (OutputCreate,XtProc,"outputCreate")
131 DEFINE_GETTER_SETTER (InputCreate,XtProc,"inputCreate")
132 DEFINE_GETTER_SETTER (TopPosition,int,"topPosition")
136 class WXmScrolledText : public WXmText {
139 WXmScrolledText (WComposite& father, char* name, int /* automanage */,
140 ArgList args = NULL, Cardinal card = 0)
141 : WXmText (XmCreateScrolledText(Widget(father), name, args, card))
144 WXmScrolledText (WComposite& father, char* name, ArgList args,
146 : WXmText (XmCreateScrolledText(Widget(father), name, args, card))
151 #define NULLWXmText WXmText((Widget)0)
152 #define NULLWXmScrolledText WXmScrolledText((Widget)0)