OpenCPN Partial API docs
Loading...
Searching...
No Matches
link_prop_dlg.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2010 by David S. Register *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#ifndef _LINKPROPDLG_H_
25#define _LINKPROPDLG_H_
26
27#include <wx/button.h>
28#include <wx/dialog.h>
29#include <wx/filedlg.h>
30#include <wx/filesys.h>
31#include <wx/msgdlg.h>
32#include <wx/scrolwin.h>
33#include <wx/sizer.h>
34#include <wx/statbox.h>
35#include <wx/stattext.h>
36#include <wx/string.h>
37#include <wx/textctrl.h>
38
39#ifdef __WXOSX__
40#define FRAME_WITH_LINKS_STYLE \
41 wxCAPTION | wxDEFAULT_FRAME_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER
42#else
43#define FRAME_WITH_LINKS_STYLE \
44 wxCAPTION | wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT | \
45 wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxRESIZE_BORDER
46#endif
47
51class LinkPropDlgDef : public wxDialog {
52private:
53protected:
54 wxStaticText* m_staticTextLinkDesc;
55 wxStaticText* m_staticTextLinkUrl;
56 wxButton* m_buttonBrowseLocal;
57 wxStdDialogButtonSizer* m_sdbSizerButtons;
58 wxButton* m_sdbSizerButtonsOK;
59 wxButton* m_sdbSizerButtonsCancel;
60
61 // Virtual event handlers, overide them in your derived class
62 virtual void OnLocalFileClick(wxCommandEvent& event) { event.Skip(); }
63 virtual void OnCancelClick(wxCommandEvent& event) { event.Skip(); }
64 virtual void OnOkClick(wxCommandEvent& event) { event.Skip(); }
65
66public:
67 wxTextCtrl* m_textCtrlLinkDescription;
68 wxTextCtrl* m_textCtrlLinkUrl;
69
70 LinkPropDlgDef(wxWindow* parent, wxWindowID id = wxID_ANY,
71 const wxString& title = _("Link Properties"),
72 const wxPoint& pos = wxDefaultPosition,
73 const wxSize& size = wxSize(468, 247),
74 long style = wxDEFAULT_DIALOG_STYLE);
76};
77
82public:
83 LinkPropImpl(wxWindow* parent, wxWindowID id = wxID_ANY,
84 const wxString& title = _("Link Properties"),
85 const wxPoint& pos = wxDefaultPosition,
86 const wxSize& size = wxSize(468, 247),
87 long style = wxDEFAULT_DIALOG_STYLE);
88
89private:
90 void OnLocalFileClick(wxCommandEvent& event);
91 void OnOkClick(wxCommandEvent& event);
92};
93
94#endif // _LINKPROPDLG_H_
Class LinkPropDlgDef.
Class LinkPropImpl.