ToolMap
Loading...
Searching...
No Matches
tmlabel_dlg.h
1/***************************************************************************
2 tmlabel_dlg
3 -------------------
4 copyright : (C) 2014 CREALP Lucien Schreiber
5 ***************************************************************************/
6
7/***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef _TM_LABEL_DLG_H_
17#define _TM_LABEL_DLG_H_
18
19#include <wx/wxprec.h>
20
21#ifndef WX_PRECOMP
22#include <wx/wx.h>
23#endif
24
25#include <wx/richtext/richtextctrl.h>
26
28
30
31class tmLabelDLG : public wxDialog {
32 private:
33 wxCheckBox* m_CheckActiveLabelCtrl;
34 wxChoice* m_FieldCtrl;
35 wxButton* m_AddFieldBtn;
36 wxTextCtrl* m_TextCtrl;
37 wxButton* m_AddTextBtn;
38 wxButton* m_ClearBtn;
39 wxRichTextCtrl* m_PreviewCtrl;
40
41 tmLayerProperties* m_LayerProperties;
42 tmGISDataVectorSHP* m_GisData;
43
44 wxString m_LabelDefinition;
45
46 void _CreateControls();
47
48 void _UpdatePreview();
49
50 virtual bool TransferDataToWindow();
51
52 protected:
53 void OnAddField(wxCommandEvent& event);
54
55 void OnAddText(wxCommandEvent& event);
56
57 void OnClear(wxCommandEvent& event);
58
59 public:
60 tmLabelDLG(wxWindow* parent, tmLayerProperties* properties, const wxPoint& pos = wxDefaultPosition,
61 wxWindowID id = wxID_ANY, const wxString& title = _("Labels"), const wxSize& size = wxDefaultSize,
62 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
63
65
66 wxString GetLabelDefinition() {
67 return m_LabelDefinition;
68 }
69
70 bool IsLabelVisible() {
71 return m_CheckActiveLabelCtrl->GetValue();
72 }
73};
74
75#endif
Definition tmgisdatavectorshp.h:36
Definition tmlabel_dlg.h:31
Storing object of layer type.
Definition tmlayerproperties.h:47