12 #ifndef __BM_State_H__
13 #define __BM_State_H__
30 class UI_KeyResolveInfo;
34 class BM_OpHandleLink;
35 class BM_HUDInfoArgsCopy;
83 const char *cursor = 0,
84 const char *
const *vnames = 0,
114 void exit()
override;
124 virtual void concealState();
125 virtual void revealState();
139 virtual void onVolatileState(
BM_SimpleState const* volatile_state,
bool overriding_state);
157 virtual bool handleDoubleClickEvent(
UI_Event *);
161 virtual void handleGeoChangedEvent(
UI_Event *);
164 virtual void handleDetailLookGeoChanged(
BM_DetailLook *look);
177 virtual void renderPartialOverlay(
RE_Render *
r,
int x,
int y);
183 : myInsertMode(true), myRequestNew(false), myExSitu(false) {}
213 const GenerateParms &parms);
221 bool requestnew =
false,
224 myFlags.scratch = how;
225 myFlags.requestnew = requestnew;
226 myFlags.exsitu = exsitu;
231 myFlags.requestnew = 0;
236 virtual void restart();
239 int meetsOverlayEntryConditions(
242 virtual void getKeyResolveInfo(UI_KeyResolveInfo &info);
252 virtual int hasOpNode(
const OP_Node &)
const;
253 virtual void handleOpNodeChange(
OP_Node &);
254 virtual void handleOpUIChange(
OP_Node &);
256 virtual void handleOpNetClear();
261 virtual int handleNodeDeleted(
OP_Node &);
279 {
return myFlags.requestnew; }
281 {
return myFlags.exsitu; }
287 return (myFlags.entered &
292 return myFlags.entered &
297 return myFlags.modifier;
310 virtual int findPI(BM_OpHandleLink *
pi)
const;
330 virtual BM_RMBMenuPopupMode getRMBMenuPopupMode(
short altflags)
const;
333 const char *className()
const override;
345 virtual int isOpIndependent()
const;
358 virtual void switchToOpDependent();
361 const char *getHotkeyString()
const override;
362 const char *getIconName()
const override;
363 const char *getLabel()
const override;
366 virtual void afterUndo();
371 virtual void refreshBindings(
int id,
const char *op_type);
374 virtual void refreshSettings(
int id,
const char *op_type);
376 const char *replaceCursor(
const char *newcursor)
override;
383 virtual void getHelp(
UT_String &help_text,
bool &is_html);
422 return myBusyCounter > 0;
446 bool reveal_updated_handles)
469 virtual void initializeHUDs();
485 return myViewportEventIDStack;
490 return myViewportEventIDStack;
500 virtual void doRender(
RE_Render *
r,
int x,
int y,
int ghost);
504 virtual void doRenderSaved(
RE_Render *
r,
int x,
int y,
int ghost);
516 int meetsBasicOverlayEntryConditions(
521 virtual void setBuild(
int onOff);
527 void renderSaved(
RE_Render *
r,
int x,
int y,
int ghost);
539 myState.myBusyCounter++;
544 if (myState.myBusyCounter > 0)
546 myState.myBusyCounter--;
559 friend class bmQtNotifier;
561 template<
typename T = bmQtNotifier>
virtual void stopGenerating()
void setExSitu(bool ex_situ)
PXL_API const char * getDescription(const ColorSpace *space)
Return the description of the color space.
virtual bool ignoreDisplayFlagChange() const
virtual void status(UT_String &s) const
static UI_Event theDelayedSelectionEvent
virtual bool getShowSelectedOp() const
virtual bool switchHandleTool(BM_MoveTool::Type tool, bool reveal_updated_handles)
PI_StateTemplate & getTemplate()
virtual int testDragDrop(DD_Source &)
int isRegenerating() const
virtual void resume(BM_SimpleState *=0)
virtual bool useVolatileSelection() const
virtual bool overrideSelectState(UT_StringHolder &new_state)
bool isGeneratingExSitu() const
static bool theDelayedSelectionEventIsValid
bool isBusyProcessing() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
virtual int enter(BM_EntryType how=BM_SimpleState::BM_OVERLAY_ENTRY)=0
void wantsLocates(int yesNo)
void setInsertMode(bool insert_mode)
virtual UI_Feel * getCustomSelectModeSideBar() const
UT_UniquePtr< BM_HUDInfoArgsCopy > HUDInfoArgsCopyUPtr
void startGenerating(BM_State::BM_GenerateMode how=BM_State::BM_INLINE, bool requestnew=false, bool exsitu=false)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
bool isOverlay() const override
virtual void resetStateForNew()
virtual bool useSecureSelection() const
void harden()
Take shallow copy and make it deep.
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
void setRequestNew(bool request_new)
GLuint const GLchar * name
virtual bool wantFailedOrienterEvent() const
UT_Array< int > & viewportEventIDs()
virtual bool handleTransitoryKey(const UI_Event &, int)
bool isRequestingNew() const
A map of string to various well defined value types.
int isGeneratingInline() const
const PI_StateTemplate & getTemplate() const
int isModifier() const override
virtual bool getAllowIndirectHandleDrag() const
__hostdev__ constexpr T pi()
Pi constant taken from Boost to match old behaviour.
virtual int handleMouseEvent(UI_Event *event)=0
virtual void getDragDropChoice(DD_Source &, DD_ChoiceList &)
virtual int acceptDragDrop(DD_Source &, const char *)
int isHandle() const override
void(UI_Object::* UI_EventMethod)(UI_Event *)
**If you just want to fire and args
virtual void render(RE_Render *r, int x, int y)
virtual bool showPersistent() const
virtual void renderStatusExtras(RE_Render *)
virtual void handleVolatileChanges()
virtual bool canSwitchToOpDependent() const
virtual bool doesHandleLocates() const
UT_Array< int > const & viewportEventIDs() const
virtual int hasLocates() const