Hide menu
Loading...
Searching...
No Matches

Provides logical grouping of Element objects. More...

Inheritance diagram for cadex.Drawing.Layer:
cadex.BaseObject

Public Member Functions

 Layer (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 Layer ()
 Constructor.
 
 Layer (cadex.UTF16String theName)
 Constructor.
 
void SetName (cadex.UTF16String theName)
 Sets a layer name.
 
cadex.UTF16String Name ()
 Returns a layer name.
 
void SetUuid (System.Guid theUuid)
 
System.Guid Uuid ()
 
bool IsVisible ()
 Returns true if the drawing layer is visible.
 
void SetIsVisible (bool theIsVisible)
 Sets Layer visibility status.
 
void Add (cadex.Drawing.Element theElement)
 Adds element to the drawing layer.
 
bool Remove (cadex.Drawing.Element theElement)
 Removes element from the drawing layer.
 
bool Contains (cadex.Drawing.Element theElement)
 Returns true if element has already been added to the drawing layer.
 
void Accept (cadex.Drawing.ElementVisitor theVisitor)
 Accepts the element visitor.
 
- Public Member Functions inherited from cadex.BaseObject
 BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
bool IsNull ()
 
ulong Id ()
 Return unique identifier of public object.
 
bool IsEqual (cadex.BaseObject theObj)
 
override int GetHashCode ()
 
override bool Equals (System.Object o)
 

Static Public Member Functions

static bool CompareType (cadex.BaseObject theObject)
 
static cadex.Drawing.Layer Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Detailed Description

Provides logical grouping of Element objects.

Layers are commonly used to group objects in the drawing by function (e.g. walls, furniture, etc.), but in principle they can represent any type of virtual grouping. All objects in a layer share appearance, can be shown and hidden together. A drawing element can only belong to one layer.

The drawing layer holds an IsVisible() attribute, which is true by default.

Constructor & Destructor Documentation

◆ Layer() [1/2]

cadex.Drawing.Layer.Layer ( )
inline

Constructor.

Creates not initialized object, for which IsNull() returns true.

◆ Layer() [2/2]

cadex.Drawing.Layer.Layer ( cadex.UTF16String theName)
inline

Constructor.

Creates a named object, if theName is not empty.

Member Function Documentation

◆ Accept()

void cadex.Drawing.Layer.Accept ( cadex.Drawing.ElementVisitor theVisitor)
inline

Accepts the element visitor.

Calls overloaded operator() of theVisitor for each element in drawing layer.

◆ Add()

void cadex.Drawing.Layer.Add ( cadex.Drawing.Element theElement)
inline

Adds element to the drawing layer.

See also
Remove(), Contain().

◆ Dispose()

override void cadex.Drawing.Layer.Dispose ( bool disposing)
inlineprotectedvirtual

Reimplemented from cadex.BaseObject.

◆ IsVisible()

bool cadex.Drawing.Layer.IsVisible ( )
inline

Returns true if the drawing layer is visible.

Returns false if the drawing layer IsNull().

◆ Remove()

bool cadex.Drawing.Layer.Remove ( cadex.Drawing.Element theElement)
inline

Removes element from the drawing layer.

Returns true if the element has been in the list and false otherwise.