12 #include "vtdata/vtString.h"
49 LayerType GetType() {
return m_type; }
50 bool SetVisible(
bool bVisible);
51 bool GetVisible() {
return m_bVisible; }
52 void SetModified(
bool bModified);
53 bool GetModified() {
return m_bModified; }
54 void SetSticky(
bool bSticky) { m_bSticky = bSticky; }
55 bool GetSticky() {
return m_bSticky; }
56 bool IsNative() {
return m_bNative; }
58 wxString GetImportedFrom() {
return m_wsImportedFrom; }
59 void SetImportedFrom(
const wxString &fname) { m_wsImportedFrom = fname; }
62 static vtLayer *CreateNewLayer(LayerType ltype);
63 bool Save(
bool progress_callback(
int) = NULL);
64 bool SaveAs(
const wxString &filename = _T(
""),
bool progress_callback(
int) = NULL);
65 bool Load(
const wxString &filename = _T(
""));
70 virtual void DrawLayer(wxDC *pDC,
vtScaledView *pView) = 0;
73 virtual bool OnSave(
bool progress_callback(
int) = NULL) = 0;
74 virtual bool OnLoad() = 0;
85 virtual bool SetExtent(
const DRECT &rect) {
return false; }
86 virtual void GetPropertyText(wxString &str) {}
87 virtual wxString GetFileExtension();
88 virtual bool CanBeSaved() {
return true; }
89 virtual wxString GetLayerFilename() {
return m_wsFilename; }
90 virtual void SetLayerFilename(
const wxString &fname);
91 virtual bool AskForSaveFilename();
92 vtString GetExportFilename(
const wxString &format_filter);
103 static wxArrayString LayerTypeNames;
104 static const wxChar *LayerFileExtension[];
107 wxString GetSaveFileDialogFilter();
108 void SetMessageText(
const wxString &msg);
111 wxString m_wsFilename;
114 wxString m_wsImportedFrom;
134 virtual void DestructItems(uint first, uint last);
135 vtLayer *FindByFilename(
const wxString &name);
153 wxString GetLayerTypeName(
const LayerType &lype);