12 #ifndef __OP_NetworkBox__
13 #define __OP_NetworkBox__
32 #define OP_NETWORKBOX_DEFAULT_W 2.5F
33 #define OP_NETWORKBOX_DEFAULT_H 2.5F
34 #define OP_NETWORKBOX_MINIMUM_W 0.3F
35 #define OP_NETWORKBOX_MINIMUM_H 0.3F
36 #define OP_NETWORKBOX_MINIMIZED_W 2.5F
75 bool propagate_parent_event);
88 void setW(
fpreal w,
bool force =
false);
89 void setH(
fpreal h,
bool force =
false);
94 bool setWWithBoundsChecks(
fpreal w);
99 bool setHWithBoundsChecks(
fpreal h);
108 fpreal getMaximizedW()
const;
109 fpreal getMaximizedH()
const;
132 {
return setName(name); }
141 int getNitems()
const;
142 int getNexposedItems()
const;
148 bool include_hidden =
true,
149 bool recursive =
true,
150 bool picked_only =
false)
const;
152 bool include_hidden =
true,
153 bool recursive =
true,
154 bool picked_only =
false)
const;
159 bool include_hidden =
true,
160 bool recursive =
true,
161 bool picked_only =
false)
const;
164 template <
typename F>
170 const F &functor)
const;
178 bool propagate_parent_event =
true,
179 bool resize_to_fit =
true);
184 bool propagate_parent_event =
true,
185 bool do_reparent =
false,
186 bool save_undo =
true);
188 bool removeAllItems(
bool do_reparent =
false);
195 bool snap_to_bounds);
206 bool propagate_parent_event =
true)
override;
209 bool getMinimized()
const;
215 bool setMinimized(
bool isminimized,
216 bool update_position,
217 bool propagate_parent_event);
232 void setMarked(
bool flag);
241 fpreal &
y2,
bool incl_buff_border =
true)
249 void snapToBounds(
bool incl_buff_border =
true);
263 void resolveLoadedOwnerName();
279 bool save_to_hip)
const;
284 int saveCommand(std::ostream &os,
const char *name,
285 int dogeneral)
const;
293 {
return myUniqueId; }
296 static const UT_Color &defaultColor();
300 static void clearAllPendingUndoFlags();
311 void setResizing(
bool resizing);
312 bool getResizing()
const;
315 void setAutoFit(
bool autofit);
316 bool getAutoFit()
const;
326 static void netChanged(
OP_Node *caller,
void *callee,
330 void saveForUndoAlpha();
331 void saveForUndoLayout();
332 void saveForUndoMinimize();
334 void saveForUndoRename();
335 void saveForUndoComment();
336 void saveForUndoResize();
338 void clearUndoFlags();
339 void setAnyUndoFlag();
340 bool getAnyUndoPending()
const;
344 void setUniqueId(
int id);
377 bool myAnyUndoFlagSet;
381 static fpreal theDragbarHeight;
389 template <
typename F>
396 const F &functor)
const
404 if (include_hidden ||
416 box.
traverseItems(item_mask, include_hidden, recursive, picked_only,
const UT_String & getItemName() const override
void traverseItems(OP_ItemTypeMask item_mask, bool include_hidden, bool recursive, bool picked_only, const F &functor) const
virtual OP_ItemType getItemType() const =0
Our children should implement this and return what type of item they are.
bool setItemName(const UT_String &name) override
int64 getMemoryUsage(bool inclusive) const
virtual void setXY(fpreal x, fpreal y)=0
virtual fpreal getY() const =0
const UT_StringHolder & getComment() const
virtual fpreal getX() const =0
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
virtual OP_Network * getParentNetwork() const =0
Returns the network that is our parent.
virtual bool setPicked(bool on_off, bool propagate_parent_event=true)=0
virtual fpreal getW() const =0
int64 getItemUniqueId() const override
Functions to get hip-file-unique ids for any item type.
GLfloat GLfloat GLfloat alpha
GLuint const GLchar * name
const OP_Stat & getStat() const
unsigned int OP_ItemTypeMask
GLfloat GLfloat GLfloat GLfloat h
SIM_API const UT_StringHolder force
virtual bool getPicked() const =0
GLubyte GLubyte GLubyte GLubyte w
virtual fpreal getH() const =0
GLdouble GLdouble GLdouble y2