HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BM_State.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: Direct manipulation library (C++)
7  *
8  * COMMENTS:
9  * The base class of a BM state.
10  *
11  */
12 #ifndef __BM_State_H__
13 #define __BM_State_H__
14 
15 #include "BM_API.h"
16 #include "BM_ParmState.h"
17 #include "BM_MoveTool.h"
18 #include <PY/PY_Result.h>
19 #include <UI/UI_Keyboard.h>
20 #include <UT/UT_Array.h>
21 #include <UT/UT_HUDInfoArgs.h>
22 #include <UT/UT_StringMap.h>
23 #include <UT/UT_UniquePtr.h>
24 
25 class DD_ChoiceList;
26 class DD_Source;
27 class UT_Options;
28 class UT_StringHolder;
29 class UT_Undo;
30 class UI_KeyResolveInfo;
31 class PI_StateTemplate;
32 class OP_Node;
33 class OP_Network;
34 class BM_OpHandleLink;
35 class BM_HUDInfoArgsCopy;
36 class bmQtNotifier;
37 class bmViewNotifier;
38 
39 // A dummy base class for GUI_DetailLook.
41 {
42 public:
43  virtual ~BM_DetailLook() { }
44 };
45 
47 {
48 public:
50  sticky = 1; // must be sticky by default (obsolete)
51  entered = 0;
52  scratch = 0;
53  requestnew = 0;
54  preempted = 0;
55  busybuild = 0;
56  wantlocate = 0;
57  modifier = 0;
58  concealed = 0;
59  }
60  unsigned sticky:1, // does not pop back after an operation
61  entered:3, // the way it was entered (BM_EntryType)
62  scratch:3, // entered from scratch
63  requestnew:1, // a new node is requested when generating
64  exsitu:1, // ex situ when generating
65  preempted:1, // have I been interrupted or not
66  busybuild:1, // I'm in the building stage (not editing)
67  wantlocate:1, // want to get locate events
68  modifier:1, // changes geometry, etc or not?
69  concealed:1; // are we concealed in a non-visible desktop?
70 };
71 
73 {
74 public:
75  enum BM_GenerateMode { BM_INLINE = 0x01,
76  BM_OUTLINE = 0x02,
77  BM_REGENERATE = 0x04
78  };
79 
80  // Class constructor and destructor.
81  BM_State( BM_SceneManager &app,
82  PI_StateTemplate &templ,
83  const char *cursor = 0,
84  const char *const *vnames = 0,
85  UI_EventMethod const *vmethods = 0);
86  ~BM_State() override;
87 
88  int getUniqueId() const { return myUniqueId; }
89 
90  // Return the current status string for this state. This is used by the
91  // viewport rendering code to display some extra information in the
92  // viewport instead of in the blue status bar. If this string is
93  // returned empty (the default), it is ignored.
94  virtual void status(UT_String &s) const { s.harden(""); }
95 
96  // Render whatever extra things may be needed beside the status string.
97  // You can assume that translations to that location have been performed
98  // already (i.e., you can render without moving).
99  virtual void renderStatusExtras(RE_Render *) {}
100 
101  int isHandle() const override { return 0; }
102 
103  // Enter or exit this state. There are 2 entry types:
104  // 1. fulltime (BM_FULLTIME_ENTRY): the state stays on until another one
105  // is invoked; that other state replaces the current.
106  // 2. overlay (BM_OVERLAY_ENTRY): also known as "volatile", it gets
107  // triggered by pressing a key and stays on until the key is released.
108  // Upon exiting it returns control to the previous state. It is not
109  // allowed to overlay the current state with itself or to have
110  // nested overlay states. When starting the overlay state, the
111  // previous state is _interrupted_, not exited; then, it is _resumed_.
112  // enter() returns 0 if entered and -1 if not.
113  int enter(BM_SimpleState::BM_EntryType how) override;
114  void exit() override;
115 
116 
117  //
118  // When the current desktop is changed, it's possible that the state might
119  // have to clean up some stuff. The concealed() method is called when the
120  // desktop is changed, the revealed() method when the desktop is re-opened.
121  // Note, it may be possible to get a revealed() called without having the
122  // concealed called.
123  //
124  virtual void concealState();
125  virtual void revealState();
126 
127  // Interrupt this state or resume its activity. These methods should
128  // be called by overlay states when entering and exiting respectively.
129  // Interrupt will leave the state in limbo and will usually turn off
130  // the feed from the app; resume will do the opposite. interrupt()
131  // should not change the modeler's current state. If 'state' is given, it
132  // is the state that has interrupted/resumed us. This may be particularly
133  // useful if we are interrupted by a handle (possibly ours).
134  void interrupt(BM_SimpleState *state = 0) override;
135  void resume(BM_SimpleState *state = 0) override;
136  virtual void handleVolatileChanges() {}
137  // Gives the opportunity to a state to react when a volatile state
138  // is invoked.
139  virtual void onVolatileState(BM_SimpleState const* volatile_state, bool overriding_state);
140 
141  // Pre-process a mouse start event, in case we wish to push/position a
142  // handle so the mouse event is processed by the handle.
143  virtual int preprocessSelect(UI_Event *event);
144 
145  // Deal with the events the modeler has sent me. Scene events imply use
146  // of the mouse. Return 1 if consumed and 0 otherwise.
147  int handleMouseEvent (UI_Event *event) override;
148 
149  // This is where mouse wheel events get sent.
150  // Integer deltas are stored into event->state.values[Z] where 1 step is a
151  // multiple of 100. Positive values indicates that the wheel rotated
152  // forwards away from the use, while negative values are the opposite.
153  // Return 1 if consumed and 0 otherwise.
154  virtual int handleMouseWheelEvent(UI_Event *event);
155 
156  // Return false if un-handled.
157  virtual bool handleDoubleClickEvent(UI_Event *);
158 
159  // Called whenever the geometry changed (but not when the change was
160  // caused by modelling in this state)
161  virtual void handleGeoChangedEvent(UI_Event *);
162 
163  // Called when a detail look's geometry is modified.
164  virtual void handleDetailLookGeoChanged(BM_DetailLook *look);
165 
166  // Called by the viewer to pass the handleDetailLookGeoChanged() calls
167  // down to any other saved (interrupted) states.
168  void propagateDetailLookGeoChanged(BM_DetailLook *look);
169 
170  // Called by the viewport to allow the state to render its own bits.
171  // It calls doRender(), which is what derived classes should implement.
172  void render(RE_Render *r, int x, int y) override;
173 
174  // The state might contain something that it wants to display in a
175  // non-destructive manner (eg. by xor'ing). Note that this method is not
176  // called during the normal rendering of the workbench.
177  virtual void renderPartialOverlay(RE_Render *r, int x, int y);
178 
180  {
181  public:
183  : myInsertMode(true), myRequestNew(false), myExSitu(false) {}
184 
185  // We can start generating either in inline (insert) mode
186  // or in branching-off mode. The generation mode is relevant only when
187  // generating ops in a network.
188  void setInsertMode(bool insert_mode) { myInsertMode = insert_mode; }
189  bool insertMode() const { return myInsertMode; }
190 
191  // Some states reuse existing ops when possible instead of generating
192  // new ones. A request can be made for new ops here, but it is up to
193  // the individual state to interpret it.
194  void setRequestNew(bool request_new) { myRequestNew = request_new; }
195  bool requestNew() const { return myRequestNew; }
196 
197  // When the ex situ flag is true, this call is being made after the tool
198  // that the user triggered did something like change the viewer network
199  // so that the generate() is occuring in a different context to the one
200  // the user had when initially triggering the tool.
201  void setExSitu(bool ex_situ) { myExSitu = ex_situ; }
202  bool isExSitu() const { return myExSitu; }
203 
204  private:
205  bool myInsertMode;
206  bool myRequestNew;
207  bool myExSitu;
208  };
209 
210  // Similar to enter, but totally from scratch. At this level, it's the
211  // same as doing an enter. It cannot be entered in volatile mode.
212  virtual int generate(BM_SimpleState::BM_EntryType how,
213  const GenerateParms &parms);
214 
215  // Start or stop the generation process. At this level, generating doesn't
216  // mean a thing. We can start generating either in inline (insert) mode
217  // or in branching-off mode. The inline mode is the default. The mode
218  // is relevant only when generating ops in a network.
221  bool requestnew = false,
222  bool exsitu = false)
223  {
224  myFlags.scratch = how;
225  myFlags.requestnew = requestnew;
226  myFlags.exsitu = exsitu;
227  }
228  virtual void stopGenerating()
229  {
230  myFlags.scratch = 0;
231  myFlags.requestnew = 0;
232  myFlags.exsitu = 0;
233  }
234 
235  // Restart cancels what is currently being done and starts generating anew.
236  virtual void restart();
237 
238  // Also, find out whether you meet the overlay conditions to be entered.
239  int meetsOverlayEntryConditions(
240  const UI_Event &event) const;
241 
242  virtual void getKeyResolveInfo(UI_KeyResolveInfo &info);
243 
244  // Override this to handle transitory key presses, default implementation
245  // does nothing. Return true if key was handled. The key is in
246  // event.state.id and the keypress state is in event.state.data.
247  virtual bool handleTransitoryKey(const UI_Event & /*event*/,
248  int /*hotkey_id*/)
249  { return false; }
250 
251  // Called if the state needs to handle changes in op parameters
252  virtual int hasOpNode(const OP_Node &/*node*/) const;
253  virtual void handleOpNodeChange(OP_Node &/*node*/);
254  virtual void handleOpUIChange(OP_Node &/*node*/);
255  virtual void handleOpNetChange(OP_Network &/*net*/);
256  virtual void handleOpNetClear();
257 
258  // See how you can handle a node being deleted. If it's an implicit
259  // node we might be OK. Return 0 if we can handle it, -1 if we must be
260  // exited or restarted from scratch.
261  virtual int handleNodeDeleted(OP_Node &/*node*/);
262 
263  // Set or get the "locate" flag, which determines whether we're interested
264  // in locate events or not.
265  void wantsLocates(int yesNo) { myFlags.wantlocate=yesNo; }
266  virtual int hasLocates() const{ return myFlags.wantlocate;}
267  virtual bool doesHandleLocates() const { return false; }
268 
269  // Query some of the flags:
270  int isPreempted() const { return myFlags.preempted; }
271  int isBuilding () const { return myFlags.busybuild; }
272  int isEntered() const { return myFlags.entered; }
273  bool isConcealed() const { return myFlags.concealed; }
274 
275  int isGenerating() const { return myFlags.scratch; }
276  int isGeneratingInline() const
277  { return myFlags.scratch==BM_State::BM_INLINE; }
278  bool isRequestingNew() const
279  { return myFlags.requestnew; }
280  bool isGeneratingExSitu() const
281  { return myFlags.exsitu; }
282  int isRegenerating() const
283  { return myFlags.scratch==BM_State::BM_REGENERATE; }
284 
285  bool isOverlay() const override
286  {
287  return (myFlags.entered &
289  }
290  int isFullTime() const
291  {
292  return myFlags.entered &
294  }
295  int isModifier() const override
296  {
297  return myFlags.modifier;
298  }
299 
300  // If a state generates a sop and displays it (eg. a hide sop), it
301  // will want the state controller to ignore the change so the state
302  // doesn't exit.
303  virtual bool ignoreDisplayFlagChange() const { return false; }
304 
305  // Return a pointer to the feel containing the extra buttons of the state.
306  // If a state has no extra buttons, 0 will be returned.
307  virtual int findPI(BM_OpHandleLink *pi) const;
308 
309  // Find out if the state is inherently sticky whether entered FULLTIME or
310  // not. Non-sticky (ie oneTime) states pop back to the view state after
311  // they've completed an operation. A state is sticky by default.
312  int isSticky() const { return myFlags.sticky; }
313 
314  // Check if MMB can be used for indirect handle drags. Some states use
315  // the MMB themselves.
316  virtual bool getAllowIndirectHandleDrag() const { return true; }
317 
318  // Checks if and how an RMB menu can be popped up. Usually, when the state
319  // is in building mode, the RMB menus are not allowed (since RMB is used
320  // to complete building/drawing/selection).
322  {
323  BM_RMB_MENU_ALLOWED, // show the menu right away
324  BM_RMB_MENU_DELAYED, // wait and show menu if mouse was not dragged
325  BM_RMB_MENU_DENIED // don't show the menu at all
326  };
327  virtual BM_RMBMenuPopupMode getRMBMenuPopupMode(short altflags) const;
328 
329  // The name of this class:
330  const char *className() const override;
331 
332  const PI_StateTemplate &getTemplate() const { return myTemplate; }
333  PI_StateTemplate &getTemplate() { return myTemplate; }
334 
335  // For most states, op dependency is determined entirely by the state
336  // template. It is possible, however, for the state instance itself
337  // to dynamically change whether or not it is op dependent on the fly.
338  // Any state changing its op dependency in this fashion must notify the
339  // appropriate BM_OpStateControl by calling its updateOpDependence()
340  // method. In general, getTemplate().opIndependent() should be false
341  // for such states to allow use of switchToOpDependent().
342  virtual int isOpIndependent() const;
343 
344  // Normally, when a user wants to switch to a node's default state, say
345  // by hitting BM_KEY_ACCEPT, when already in that state, we have to use
346  // a new instance whenever the current instance is not op dependent.
347  //
348  // These methods make it possible to override that behavior and change
349  // the current instance to be op dependent.
350  //
351  // NB: Only used when !getTemplate().opIndependent() && isOpIndependent(),
352  // i.e., it is registered as an op dependent state that is currently
353  // not op dependent, and hasOpNode() returns true for the target node.
354  virtual bool canSwitchToOpDependent() const { return false; }
355  virtual void switchToOpDependent();
356 
357  // Returns the state HUD Info.
358  const char *getHotkeyString() const override;
359  const char *getIconName() const override;
360  const char *getLabel() const override;
361  const char *getDescription() const override;
362 
363  virtual void afterUndo();
364 
365  // The user can dynamically change the bindings from the textport
366  // We need to refresh the current handles in the viewport because
367  // they could be affected.
368  virtual void refreshBindings(int id, const char *op_type);
369  // This method is called reload the stored settings of any attached
370  // PIs when these settings may have been changed.
371  virtual void refreshSettings(int id, const char *op_type);
372 
373  const char *replaceCursor(const char *newcursor) override;
374 
375  // Return the help for this state in the string that's passed in.
376  // (Note that custom states may override getHelp() to
377  // provide help, even though there is no actual help file.) is_html
378  // will be set to indicate if the help is in html or not.
379  // NOTE: The help file may contain unexpanded hotkey variables.
380  virtual void getHelp(UT_String &help_text, bool &is_html);
381 
382  // Find all help file information, see FUSE:openHdoxURL().
383  virtual void getHelpDirAndNameOrUrl(UT_StringHolder &dir,
385  UT_StringHolder &url);
386 
387  // Show persistent handles in this state?
388  virtual bool showPersistent() const { return true; }
389 
390  // Return true if we would like to receive an event intended for the
391  // click-orienter but was not consumed by it. All normal states should
392  // only want this event if they are overlay states.
393  virtual bool wantFailedOrienterEvent() const { return isOverlay(); }
394 
395  // Show the geometry of the selected operator in this state?
396  virtual bool getShowSelectedOp() const { return true; }
397 
398  // Reset and clear any remembered state data. Used mainly for states such
399  // as view, which would like to home on world origin again, etc.
400  virtual void resetStateForNew() { };
401 
402  // A state can override what appears in the select mode side bar of the
403  // viewer.
404  virtual UI_Feel *getCustomSelectModeSideBar() const { return 0; }
405 
406  // Returns true if the state respects the secure selection setting.
407  virtual bool useSecureSelection() const { return true; }
408 
409  // Returns true if the state supports volatile selections.
410  virtual bool useVolatileSelection() const { return false; }
411 
412  // Get the global state preferences. Preferences for individual states
413  // should be prefixed with "<getTemplate().name()>.".
414  static UT_Options &getGlobalPrefs();
415 
416  // returns true if this instance is executing code in a 'busy' mode
417  bool isBusyProcessing() const
418  {
419  return myBusyCounter > 0;
420  }
421 
422  // Drag and drop support
423  virtual int testDragDrop(DD_Source &)
424  {
425  return 0;
426  }
428  {
429  }
430  virtual int acceptDragDrop(DD_Source &, const char * /*label*/)
431  {
432  return 0;
433  }
434 
435  // Virtual method to let the state handle Move tool switching.
436  // Return false to let the view check the current handle and PIs do the handling.
437  // Return true to consume the event and have your state do the handling.
438  // 'tool' is the move tool mode to switch to.
439  // 'reveal_updated_handles' should be true for almost all calls and false
440  // only when called from JEDI_View::resetMoveToolIfNeeded. Your state can
441  // choose to keep handles invisible if needed.
443  bool reveal_updated_handles)
444  {
445  return false;
446  }
447 
448  // Virtual method to let the state override the default select state.
449  // Return true to override and use a new state name in 'new_state'.
450  // Return false to keep the default select state.
451  // 'new_state' is used as an in/out value and it holds the current select
452  // state name when the method is called.
453  // Set 'new_state' to the name of a volatile state or set it to the name
454  // of the current BM_State to avoid select state switching.
455  virtual bool overrideSelectState(UT_StringHolder &new_state)
456  {
457  return false;
458  }
459 
460  // Called when the state should first initialize its HUDs. This will be
461  // during enter()/generate(). This base implementation runs any updates
462  // that were stashed during construction.
463  //
464  // More specifically, this is called by the enter()/generate() methods at
465  // this level.
466  virtual void initializeHUDs();
467 
468  // This method updates a HUD at render time.
469  int updateHUD(UT_HUDInfoArgs const& args);
470 
471  // Called by BM_ResourceManager::newState() to pass over ownership of
472  // the HUD info args stashed for any HUD updates during construction.
474  void stealNewStateHUDQueue(UT_Array<HUDInfoArgsCopyUPtr> &&queue);
475 
476  void enterHUD();
477  void exitHUD();
478  void renderHUD();
479 
481  {
482  return myViewportEventIDStack;
483  }
484 
486  {
487  return myViewportEventIDStack;
488  }
489 
490 protected:
491  friend class Busy;
492 
493  // The state might contain some geometry it wants to display, but may not
494  // want it to be part of the main gdp. This method allows the state to
495  // "sneak in" this special geometry that it might have (eg. a rubber band
496  // when building curves). This method is called by DM_State::render().
497  virtual void doRender(RE_Render *r, int x, int y, int ghost);
498 
499  // Similar to doRender() but called on a saved (interrupted) state for
500  // states which may want to handle it.
501  virtual void doRenderSaved(RE_Render *r, int x, int y, int ghost);
502 
503  // Make this a state that changes data or not (0 by default):
504  void setModifier(int yn) { myFlags.modifier = yn; }
505 
506  // Find out whether the general entry conditions for overlay states
507  // are met (before you test for your specific key conditions).
508  // The basic conditions are that:
509  // - the event type is key up/down
510  // - no mouse button is down
511  // - we're not the current state
512  // - the current state is not an overlay itself
513  int meetsBasicOverlayEntryConditions(
514  const UI_Event &e) const;
515 
516  // Set the build flag, ie. whether we're actually building something now
517  // or making changes to geometry that is linked to this state.
518  virtual void setBuild(int onOff);
519 
520  void handleMouseEventVoidRet(UI_Event *event);
521 
522  // Call doRenderSaved on saved states recursively in case they want to
523  // handle it.
524  void renderSaved(RE_Render *r, int x, int y, int ghost);
525 
526  // This class is intended for classes deriving from BM_State to execute
527  // their code in a 'busy' mode. While the code executes, calling
528  // BM_State::isBusyProcessing() will return true. The 'busy' mode gets reset
529  // when the derived class method using Busy goes out of scope.
530  struct Busy
531  {
532  Busy() = delete;
533 
534  Busy( BM_State & state ) : myState(state)
535  {
536  myState.myBusyCounter++;
537  }
538 
540  {
541  if (myState.myBusyCounter > 0)
542  {
543  myState.myBusyCounter--;
544  }
545  }
546 
548  };
549 
550  BM_StateFlags myFlags; // useful flags
551 
554 
555 private:
556  friend class bmQtNotifier;
557 
558  template<typename T = bmQtNotifier>
559  void processHUDCommand(UT_HUDInfoArgs::Command hud_cmd);
560 
561  PI_StateTemplate &myTemplate;
562 
563  bool myCursorPushed;
564  int myBusyCounter;
565  UT_Array<int> myViewportEventIDStack;
566  int myUniqueId;
567 
568  // HUD info updates queued while this state was being constructed in
569  // BM_ResourceManager::newState().
570  UT_Array<HUDInfoArgsCopyUPtr> myNewStateHUDQueue;
571 
572  // Specific data member for handling the HUD notifications.
573  UT_SharedPtr<bmQtNotifier> myQtNotifier;
574  UT_SharedPtr<bmViewNotifier> myViewNotifier;
575 
576 };
577 
578 #endif
virtual void stopGenerating()
Definition: BM_State.h:228
virtual ~BM_DetailLook()
Definition: BM_State.h:43
void setExSitu(bool ex_situ)
Definition: BM_State.h:201
PXL_API const char * getDescription(const ColorSpace *space)
Return the description of the color space.
virtual bool ignoreDisplayFlagChange() const
Definition: BM_State.h:303
virtual void status(UT_String &s) const
Definition: BM_State.h:94
static UI_Event theDelayedSelectionEvent
Definition: BM_State.h:553
int isPreempted() const
Definition: BM_State.h:270
virtual bool getShowSelectedOp() const
Definition: BM_State.h:396
int isGenerating() const
Definition: BM_State.h:275
bool insertMode() const
Definition: BM_State.h:189
virtual bool switchHandleTool(BM_MoveTool::Type tool, bool reveal_updated_handles)
Definition: BM_State.h:442
BM_RMBMenuPopupMode
Definition: BM_State.h:321
PI_StateTemplate & getTemplate()
Definition: BM_State.h:333
virtual int testDragDrop(DD_Source &)
Definition: BM_State.h:423
bool requestNew() const
Definition: BM_State.h:195
GLdouble s
Definition: glad.h:3009
int isRegenerating() const
Definition: BM_State.h:282
GLint y
Definition: glcorearb.h:103
void setModifier(int yn)
Definition: BM_State.h:504
virtual void resume(BM_SimpleState *=0)
virtual bool useVolatileSelection() const
Definition: BM_State.h:410
virtual bool overrideSelectState(UT_StringHolder &new_state)
Definition: BM_State.h:455
bool isGeneratingExSitu() const
Definition: BM_State.h:280
static bool theDelayedSelectionEventIsValid
Definition: BM_State.h:552
bool isBusyProcessing() const
Definition: BM_State.h:417
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
int getUniqueId() const
Definition: BM_State.h:88
struct _cl_event * event
Definition: glcorearb.h:2961
bool isExSitu() const
Definition: BM_State.h:202
virtual int enter(BM_EntryType how=BM_SimpleState::BM_OVERLAY_ENTRY)=0
int isEntered() const
Definition: BM_State.h:272
void wantsLocates(int yesNo)
Definition: BM_State.h:265
void setInsertMode(bool insert_mode)
Definition: BM_State.h:188
int isBuilding() const
Definition: BM_State.h:271
virtual UI_Feel * getCustomSelectModeSideBar() const
Definition: BM_State.h:404
UT_UniquePtr< BM_HUDInfoArgsCopy > HUDInfoArgsCopyUPtr
Definition: BM_State.h:473
void startGenerating(BM_State::BM_GenerateMode how=BM_State::BM_INLINE, bool requestnew=false, bool exsitu=false)
Definition: BM_State.h:219
BM_GenerateMode
Definition: BM_State.h:75
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
bool isOverlay() const override
Definition: BM_State.h:285
virtual void resetStateForNew()
Definition: BM_State.h:400
virtual bool useSecureSelection() const
Definition: BM_State.h:407
bool isConcealed() const
Definition: BM_State.h:273
void harden()
Take shallow copy and make it deep.
Definition: UT_String.h:215
virtual void interrupt(BM_SimpleState *=0)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the queue
Definition: thread.h:623
void setRequestNew(bool request_new)
Definition: BM_State.h:194
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual bool wantFailedOrienterEvent() const
Definition: BM_State.h:393
GLint GLenum GLint x
Definition: glcorearb.h:409
UT_Array< int > & viewportEventIDs()
Definition: BM_State.h:485
Busy(BM_State &state)
Definition: BM_State.h:534
virtual bool handleTransitoryKey(const UI_Event &, int)
Definition: BM_State.h:247
#define BM_API
Definition: BM_API.h:10
BM_State & myState
Definition: BM_State.h:547
bool isRequestingNew() const
Definition: BM_State.h:278
A map of string to various well defined value types.
Definition: UT_Options.h:84
int isGeneratingInline() const
Definition: BM_State.h:276
const PI_StateTemplate & getTemplate() const
Definition: BM_State.h:332
virtual void exit()=0
BM_StateFlags myFlags
Definition: BM_State.h:550
int isModifier() const override
Definition: BM_State.h:295
virtual bool getAllowIndirectHandleDrag() const
Definition: BM_State.h:316
virtual int handleMouseEvent(UI_Event *event)=0
virtual void getDragDropChoice(DD_Source &, DD_ChoiceList &)
Definition: BM_State.h:427
virtual int acceptDragDrop(DD_Source &, const char *)
Definition: BM_State.h:430
int isHandle() const override
Definition: BM_State.h:101
void(UI_Object::* UI_EventMethod)(UI_Event *)
Definition: UI_Object.h:36
**If you just want to fire and args
Definition: thread.h:609
virtual void render(RE_Render *r, int x, int y)
constexpr T pi()
Pi constant taken from Boost to match old behaviour.
Definition: Math.h:119
virtual bool showPersistent() const
Definition: BM_State.h:388
virtual void renderStatusExtras(RE_Render *)
Definition: BM_State.h:99
virtual void handleVolatileChanges()
Definition: BM_State.h:136
GLboolean r
Definition: glcorearb.h:1222
virtual bool canSwitchToOpDependent() const
Definition: BM_State.h:354
int isFullTime() const
Definition: BM_State.h:290
virtual bool doesHandleLocates() const
Definition: BM_State.h:267
int isSticky() const
Definition: BM_State.h:312
UT_Array< int > const & viewportEventIDs() const
Definition: BM_State.h:480
virtual int hasLocates() const
Definition: BM_State.h:266