CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
EdUserIO.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef _ODEDUSERIO_H_INCLUDED_
25#define _ODEDUSERIO_H_INCLUDED_
26
27#include "OdPlatform.h"
28#include "Gi/GiDrawable.h"
29#include "OdString.h"
30#include "SharedPtr.h"
31#include "RxObject.h"
32
33#include "../FxClangExceptionRTTIWorkaround.h"
34
35class OdGePoint3d;
36
37#include "TD_PackPush.h"
38
43namespace OdEd
44{
46 {
47 kInpDefault = 0x00000000,
50 kInpThrowEmpty = (long)0x80000000,
51 kInpThrowOther = 0x40000000,
52 kInpNonZero = 0x20000000, // Disallow zero input
53 kInpNonNeg = 0x10000000, // Disallow negative input
54 kInpThrowEmptyInQuotes = 0x02000000
55 };
56
58 {
59 kGfpForOpen = 0, // For Open.
60 kGfpForSave = 1, // For Save.
61 kGfpOverwritePrompt = 2 // Enable overwrite prompt displaying when exist file selected for saving.
62 };
63
65 {
66 kGstDefault = 0, // Spaces disallowed, no KeywordExceptions
67 kGstNoSpaces = 0, // Spaces disallowed
68 kGstAllowSpaces = 1, // The first space character will not terminate the input.
69 kGstNoEmpty = 2 // The first space character will not terminate the input.
70 };
71
73 {
74 kGptDefault = 0x00000000,
79 kGptNoLimCheck = 0x00000001, // Ignore the LIMMIN and LIMMAX system variables
80 kGptNoUCS = 0x00000002, // Do not project result point onto UCS plane (input point in eye plane)
81 kGptRubberBand = 0x00000004,
82 kGptRectFrame = 0x00000008,
83 kGptBeginDrag = 0x00000010,
84 kGptEndDrag = 0x00000020,
85 kGptNoOSnap = 0x00000040, // Disables object snaps
86 kGanFromLastPoint = 0x00000080,
88 kGanNoAngBase = 0x00000100,
89 kGds2d = 0x00000200, // Restrict (getDistance) to 2D
90 kGdsSignedDist = 0x00000400,
91 kGdsPerpDist = 0x00000800, // is in perpendicular plane to UCS plane
92 kGdsNoZero = 0x00001000,
96 kGdsNoNeg = 0x00002000,
99 };
100
102 {
103 kSelDefault = 0x00000000,
104 kSelPickLastPoint = 0x00000001, // Use last entered point as first corner of selection box
105 kSelSingleEntity = 0x00000002, // Select single entity
106 kSelIgnorePickFirst = 0x00000004, // Clear previous contents of selection set
107 kSelSinglePass = 0x00000008, // Use single pass for selection
108 // (no pressing Enter is required to finish selection)
109 kSelAllowEmpty = 0x00000010, // Empty selection set is allowed
110 kSelRemove = 0x00000020, // Remove selected entities from current selection set
111 kSelLeaveHighlighted= 0x00000040, // Leave entities highlighted after operation
112 kSelAllowInactSpaces= 0x00000080, // Allow selection of all entities not only in active layout
113
114 kSelAllowObjects = 0x00000100, // Allow non-entity objects selection
115 kSelAllowPSVP = 0x00000200, // Allow overall Paper Space viewport selection
116 kSelAllowSubents = 0x00000400, // Allow subentities selection
117 kSelAllowLocked = 0x00000800, // Allow selection of entities on locked layers
118
119 kSelAllowSubentsAlways = 0x00001000, // Allow subentities selection independent on press CTRL
120 };
121}
122
123class OdGsView;
124class OdGsModel;
125
126class OdCmColorBase;
127
128//
129// OdEd_Classes
130//
131
140{
141public:
143
144 virtual int addDrawables(OdGsView* pView) = 0;
145 virtual void removeDrawables(OdGsView* pView) = 0;
146};
147
152
153
162{
163public:
165
166 virtual void setValue(int value) = 0;
167};
168
173
174
183{
184public:
186
187 virtual void setValue(double value) = 0;
188};
189
194
195
204{
205protected:
207public:
209
210 virtual void setValue(const OdString& value) = 0;
211
212 virtual void setCursor(const bool& showCursor)
213 {
214 this->bShowCursor = showCursor;
215 }
216};
217
222
223
228{
229public:
231
232 virtual void setValue(const OdGePoint3d& value) = 0;
233};
234
239
240
245{
246public:
248
249 virtual OdGePoint3d basePoint() const = 0;
250};
251
256
257
262{
263public:
265
266 virtual void setValue(const OdCmColorBase& value) = 0;
267};
268
273
274
275//
276// OdEd_Exceptions
277//
278
279#define OdException OdError
280
281
289{
290protected:
293
295};
296
297
305{
306public:
307
312
319
321};
322
323
331{
332public:
333
340 OdEdKeyword(int nKeyword, const OdString& sKeyword);
341
342 int keywordIndex() const;
343 const OdString& keyword() const;
344
346};
347
348
355{
356public:
357
363 OdEdOtherInput(const OdString& sInput);
364 const OdString& string() const;
365
367};
368
369
376{
377public:
378
383
385};
386
387
395{
396public:
398
402 virtual bool interactive();
403
421 virtual int getKeyword(
422 const OdString& prompt,
423 const OdString& keywords,
424 int defVal = -1,
425 int options = OdEd::kInpDefault,
426 OdEdIntegerTracker* pTracker = 0) = 0;
427
442 virtual int getInt(
443 const OdString& prompt,
444 int options = OdEd::kInpDefault,
445 int defVal = 0,
446 const OdString& keywords = OdString::kEmpty,
447 OdEdIntegerTracker* pTracker = 0) = 0;
448
463 virtual double getReal(
464 const OdString& prompt,
465 int options = OdEd::kInpDefault,
466 double defVal = 0.0,
467 const OdString& keywords = OdString::kEmpty,
468 OdEdRealTracker* pTracker = 0) = 0;
469
486 const OdString& prompt,
487 int options = OdEd::kInpDefault,
488 const OdString& defValue = OdString::kEmpty,
489 const OdString& keywords = OdString::kEmpty,
490 OdEdStringTracker* pTracker = 0) = 0;
491
496 virtual void putString(const OdString& string) = 0;
497
514 const OdString& prompt,
515 int options = OdEd::kInpDefault,
516 const OdCmColorBase* pDefaultValue = 0,
517 const OdString& keywords = OdString::kEmpty,
518 OdEdColorTracker* pTracker = 0) = 0;
519
544 const OdString& prompt,
545 int options = OdEd::kGfpForOpen,
546 const OdString& dialogCaption = OdString::kEmpty,
547 const OdString& defExt = OdString::kEmpty,
548 const OdString& fileName = OdString::kEmpty,
549 const OdString& filter = OdString::kEmpty,
550 const OdString& keywords = OdString::kEmpty,
551 OdEdStringTracker* pTracker = 0);
552
558 virtual void putError(const OdString& errmsg) { putString(errmsg); }
559};
560
561#include "TD_PackPop.h"
562
563#endif //#ifndef _ODEDUSERIO_H_INCLUDED_
OdSmartPtr< OdEdColorTracker > OdEdColorTrackerPtr
Definition: EdUserIO.h:272
#define OdException
Definition: EdUserIO.h:279
OdSmartPtr< OdEdPointTracker > OdEdPointTrackerPtr
Definition: EdUserIO.h:238
OdSmartPtr< OdEdStringTracker > OdEdStringTrackerPtr
Definition: EdUserIO.h:221
OdSmartPtr< OdEdRealTracker > OdEdRealTrackerPtr
Definition: EdUserIO.h:193
OdSmartPtr< OdEdIntegerTracker > OdEdIntegerTrackerPtr
Definition: EdUserIO.h:172
OdSmartPtr< OdEdInputTracker > OdEdInputTrackerPtr
Definition: EdUserIO.h:151
OdSmartPtr< OdEdPointDefTracker > OdEdPointDefTrackerPtr
Definition: EdUserIO.h:255
#define ODRX_ABSTRACT
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
FX_DECLARE_CLANG_RTTI_EXCEPTION_WORKAROUND()
OdEdCancel(OdErrorContext *pErrCtx)
ODRX_DECLARE_MEMBERS(OdEdColorTracker)
virtual void setValue(const OdCmColorBase &value)=0
FX_DECLARE_CLANG_RTTI_EXCEPTION_WORKAROUND()
FX_DECLARE_CLANG_RTTI_EXCEPTION_WORKAROUND()
OdEdException(OdErrorContext *pErrCtx)
virtual void removeDrawables(OdGsView *pView)=0
ODRX_DECLARE_MEMBERS(OdEdInputTracker)
virtual int addDrawables(OdGsView *pView)=0
virtual void setValue(int value)=0
ODRX_DECLARE_MEMBERS(OdEdIntegerTracker)
const OdString & keyword() const
int keywordIndex() const
FX_DECLARE_CLANG_RTTI_EXCEPTION_WORKAROUND()
OdEdKeyword(int nKeyword, const OdString &sKeyword)
const OdString & string() const
OdEdOtherInput(const OdString &sInput)
FX_DECLARE_CLANG_RTTI_EXCEPTION_WORKAROUND()
virtual OdGePoint3d basePoint() const =0
ODRX_DECLARE_MEMBERS(OdEdPointDefTracker)
ODRX_DECLARE_MEMBERS(OdEdPointTracker)
virtual void setValue(const OdGePoint3d &value)=0
virtual void setValue(double value)=0
ODRX_DECLARE_MEMBERS(OdEdRealTracker)
ODRX_DECLARE_MEMBERS(OdEdStringTracker)
virtual void setValue(const OdString &value)=0
virtual void setCursor(const bool &showCursor)
Definition: EdUserIO.h:212
virtual int getInt(const OdString &prompt, int options=OdEd::kInpDefault, int defVal=0, const OdString &keywords=OdString::kEmpty, OdEdIntegerTracker *pTracker=0)=0
virtual void putString(const OdString &string)=0
virtual double getReal(const OdString &prompt, int options=OdEd::kInpDefault, double defVal=0.0, const OdString &keywords=OdString::kEmpty, OdEdRealTracker *pTracker=0)=0
ODRX_DECLARE_MEMBERS(OdEdUserIO)
virtual OdString getFilePath(const OdString &prompt, int options=OdEd::kGfpForOpen, const OdString &dialogCaption=OdString::kEmpty, const OdString &defExt=OdString::kEmpty, const OdString &fileName=OdString::kEmpty, const OdString &filter=OdString::kEmpty, const OdString &keywords=OdString::kEmpty, OdEdStringTracker *pTracker=0)
virtual bool interactive()
virtual OdString getString(const OdString &prompt, int options=OdEd::kInpDefault, const OdString &defValue=OdString::kEmpty, const OdString &keywords=OdString::kEmpty, OdEdStringTracker *pTracker=0)=0
virtual OdSharedPtr< OdCmColorBase > getCmColor(const OdString &prompt, int options=OdEd::kInpDefault, const OdCmColorBase *pDefaultValue=0, const OdString &keywords=OdString::kEmpty, OdEdColorTracker *pTracker=0)=0
virtual int getKeyword(const OdString &prompt, const OdString &keywords, int defVal=-1, int options=OdEd::kInpDefault, OdEdIntegerTracker *pTracker=0)=0
virtual void putError(const OdString &errmsg)
Definition: EdUserIO.h:558
Definition: Gs.h:140
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
Definition: EdUserIO.h:44
GetStringOptions
Definition: EdUserIO.h:65
@ kGstNoSpaces
Definition: EdUserIO.h:67
@ kGstAllowSpaces
Definition: EdUserIO.h:68
@ kGstDefault
Definition: EdUserIO.h:66
@ kGstNoEmpty
Definition: EdUserIO.h:69
GetFilePathFlags
Definition: EdUserIO.h:58
@ kGfpOverwritePrompt
Definition: EdUserIO.h:61
@ kGfpForOpen
Definition: EdUserIO.h:59
@ kGfpForSave
Definition: EdUserIO.h:60
OdDbInputOptions
Definition: EdUserIO.h:73
@ kGptNoUCS
Definition: EdUserIO.h:80
@ kGanNoAngBase
Definition: EdUserIO.h:88
@ kGptBeginDrag
Definition: EdUserIO.h:83
@ kGptEndDrag
Definition: EdUserIO.h:84
@ kGanFromLastPoint
Definition: EdUserIO.h:86
@ kGptRubberBand
Definition: EdUserIO.h:81
@ kGdsNoZero
Definition: EdUserIO.h:92
@ kGdsNoNeg
Definition: EdUserIO.h:96
@ kGptNoLimCheck
Definition: EdUserIO.h:79
@ kGdsSignedDist
Definition: EdUserIO.h:90
@ kGptNoOSnap
Definition: EdUserIO.h:85
@ kGdsDefault
Definition: EdUserIO.h:75
@ kGrlNoNeg
Definition: EdUserIO.h:98
@ kGinNoZero
Definition: EdUserIO.h:93
@ kGptRectFrame
Definition: EdUserIO.h:82
@ kGrlDefault
Definition: EdUserIO.h:77
@ kGinDefault
Definition: EdUserIO.h:76
@ kGinNoNeg
Definition: EdUserIO.h:97
@ kGptDefault
Definition: EdUserIO.h:74
@ kGds2d
Definition: EdUserIO.h:89
@ kGdsFromLastPoint
Definition: EdUserIO.h:87
@ kGdsPerpDist
Definition: EdUserIO.h:91
@ kGanNoZero
Definition: EdUserIO.h:95
@ kGrlNoZero
Definition: EdUserIO.h:94
@ kGanDefault
Definition: EdUserIO.h:78
SelectOptions
Definition: EdUserIO.h:102
@ kSelPickLastPoint
Definition: EdUserIO.h:104
@ kSelIgnorePickFirst
Definition: EdUserIO.h:106
@ kSelAllowInactSpaces
Definition: EdUserIO.h:112
@ kSelRemove
Definition: EdUserIO.h:110
@ kSelAllowSubents
Definition: EdUserIO.h:116
@ kSelDefault
Definition: EdUserIO.h:103
@ kSelLeaveHighlighted
Definition: EdUserIO.h:111
@ kSelAllowSubentsAlways
Definition: EdUserIO.h:119
@ kSelAllowEmpty
Definition: EdUserIO.h:109
@ kSelSinglePass
Definition: EdUserIO.h:107
@ kSelSingleEntity
Definition: EdUserIO.h:105
@ kSelAllowObjects
Definition: EdUserIO.h:114
@ kSelAllowLocked
Definition: EdUserIO.h:117
@ kSelAllowPSVP
Definition: EdUserIO.h:115
CommonInputOptions
Definition: EdUserIO.h:46
@ kInpNonZero
Definition: EdUserIO.h:52
@ kInpDefault
Definition: EdUserIO.h:47
@ kInpNonNeg
Definition: EdUserIO.h:53
@ kInpDisallowOther
Definition: EdUserIO.h:49
@ kInpThrowEmptyInQuotes
Definition: EdUserIO.h:54
@ kInpDisallowEmpty
Definition: EdUserIO.h:48
@ kInpThrowOther
Definition: EdUserIO.h:51
@ kInpThrowEmpty
Definition: EdUserIO.h:50