17 #if !defined(OPENNURBS_LAYER_INC_) 18 #define OPENNURBS_LAYER_INC_ 76 bool SetLayerName(
const char* );
77 bool SetLayerName(
const wchar_t* );
96 static const wchar_t* LayerNameReferenceDelimiter();
110 static const wchar_t* LayerNamePathDelimiter();
121 static bool GetLeafName(
const wchar_t* layer_name,
ON_wString& leaf_name);
132 static bool GetParentName(
const wchar_t* layer_name,
ON_wString& parent_path_name );
148 static bool RemoveReferenceName(
const wchar_t* layer_name,
ON_wString& layer_path_name );
159 static bool GetReferenceName(
const wchar_t* layer_name,
ON_wString& reference_name );
166 per_viewport_none = 0,
169 per_viewport_color = 2,
170 per_viewport_plot_color = 4,
171 per_viewport_plot_weight = 8,
172 per_viewport_visible = 16,
173 per_viewport_persistent_visibility = 32,
175 per_viewport_all_settings = 0xFFFFFFFF
196 bool HasPerViewportSettings(
198 unsigned int settings_mask
210 bool HasPerViewportSettings(
227 bool CopyPerViewportSettings(
229 ON_UUID destination_viewport_id
252 bool CopyPerViewportSettings(
255 unsigned int settings_mask
267 void DeletePerViewportSettings(
280 void CullPerViewportSettings(
281 int viewport_id_count,
282 const ON_UUID* viewport_id_list
290 ON__UINT32 PerViewportSettingsCRC()
const;
303 void SetColor(
ON_Color layer_color );
356 void DeletePerViewportColor(
const ON_UUID& viewport_id );
369 void SetPlotColor(
ON_Color plot_color );
371 void SetPerViewportPlotColor(
ON_UUID viewport_id,
ON_Color plot_color );
407 void DeletePerViewportPlotColor(
const ON_UUID& viewport_id );
417 bool SetLinetypeIndex(
int linetype_index );
424 int LinetypeIndex()
const;
434 bool IsVisible()
const;
448 void SetVisible(
bool bVisible );
475 bool PersistentVisibility()
const;
490 void SetPersistentVisibility(
bool bPersistentVisibility );
504 void UnsetPersistentVisibility();
516 bool PerViewportIsVisible(
ON_UUID viewport_id )
const;
519 ON_DEPRECATED
bool IsVisible(
const ON_UUID& )
const;
535 void SetPerViewportVisible(
ON_UUID viewport_id,
bool bVisible );
538 ON_DEPRECATED
void SetVisible(
bool,
const ON_UUID& );
562 bool PerViewportPersistentVisibility(
ON_UUID viewport_id )
const;
577 void SetPerViewportPersistentVisibility(
ON_UUID viewport_id,
bool bPersistentVisibility );
579 void UnsetPerViewportPersistentVisibility(
ON_UUID viewport_id );
591 void DeletePerViewportVisible(
const ON_UUID& viewport_id );
607 void GetPerViewportVisibilityViewportIds(
617 bool IsLocked()
const;
628 void SetLocked(
bool bLocked );
654 bool PersistentLocking()
const;
669 void SetPersistentLocking(
bool bPersistentLocking);
682 void UnsetPersistentLocking();
688 bool IsVisibleAndNotLocked()
const;
694 bool IsVisibleAndLocked()
const;
702 bool SetRenderMaterialIndex(
int );
703 int RenderMaterialIndex()
const;
705 bool SetLayerIndex(
int );
706 int LayerIndex()
const;
708 bool SetIgesLevel(
int );
709 int IgesLevel()
const;
719 double PlotWeight()
const;
721 double PerViewportPlotWeight(
ON_UUID viewport_id )
const;
724 ON_DEPRECATED
double PlotWeight(
const ON_UUID& )
const;
734 void SetPlotWeight(
double plot_weight_mm);
744 void SetPerViewportPlotWeight(
ON_UUID viewport_id,
double plot_weight_mm);
747 ON_DEPRECATED
void SetPlotWeight(
double,
const ON_UUID& );
759 void DeletePerViewportPlotWeight(
const ON_UUID& viewport_id );
769 int UpdateViewportIds(
839 no_layer_settings = 0,
840 userdata_settings = 1,
842 plot_color_settings = 4,
843 plot_weight_settings = 8,
844 visible_settings = 16,
845 locked_settings = 32,
846 all_layer_settings = 0xFFFFFFFF
856 static unsigned int Differences(
const ON_Layer& layer0,
const ON_Layer& layer1 );
868 void Set(
unsigned int settings,
const ON_Layer& settings_values );
883 void SaveSettings(
unsigned int settings,
bool bUpdate );
892 unsigned int SavedSettings()
const;
907 bool GetSavedSettings(
ON_Layer& layer,
unsigned int& settings )
const;
934 unsigned char m_extension_bits;
virtual ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const =0
virtual ON_UUID ModelObjectId() const
ON_RenderingAttributes m_rendering_attributes
virtual ON::object_type ObjectType() const
virtual ON_BOOL32 Read(ON_BinaryArchive &binary_archive)
virtual ON_BOOL32 Write(ON_BinaryArchive &binary_archive) const
ON_UUID m_parent_layer_id
ON_UUID m_display_material_id
virtual void Dump(ON_TextLog &) const