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