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);
227 void setMarked(
bool flag);
236 fpreal &y2,
bool incl_buff_border =
true)
244 void snapToBounds(
bool incl_buff_border =
true);
258 void resolveLoadedOwnerName();
274 bool save_to_hip)
const;
279 int saveCommand(std::ostream &os,
const char *name,
280 int dogeneral)
const;
288 {
return myUniqueId; }
291 static const UT_Color &defaultColor();
295 static void clearAllPendingUndoFlags();
306 void setResizing(
bool resizing);
310 void setAutoFit(
bool autofit);
321 static void netChanged(
OP_Node *caller,
void *callee,
325 void saveForUndoLayout();
326 void saveForUndoMinimize();
328 void saveForUndoRename();
329 void saveForUndoComment();
330 void saveForUndoResize();
332 void clearUndoFlags();
333 void setAnyUndoFlag();
334 bool getAnyUndoPending()
const;
338 void setUniqueId(
int id);
367 bool myAnyUndoFlagSet;
371 static fpreal theDragbarHeight;
379 template <
typename F>
386 const F &functor)
const
394 if (include_hidden ||
406 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.
GLuint const GLchar * name
virtual bool setPicked(bool on_off, bool propagate_parent_event=true)=0
GLubyte GLubyte GLubyte GLubyte w
virtual fpreal getW() const =0
GLuint GLfloat GLfloat GLfloat x1
int64 getItemUniqueId() const override
Functions to get hip-file-unique ids for any item type.
GLuint GLfloat GLfloat GLfloat GLfloat y1
const OP_Stat & getStat() const
unsigned int OP_ItemTypeMask
GLfloat GLfloat GLfloat GLfloat h
GLsizei const GLint box[]
virtual bool getPicked() const =0
virtual fpreal getH() const =0