00001
00002
00003
00004
00005
00006
00007
00008
00010
00011 #ifndef _WXCURL_PANEL_H_
00012 #define _WXCURL_PANEL_H_
00013
00014 #include "wx/panel.h"
00015 #include "wx/curl/base.h"
00016
00017
00018 class WXDLLIMPEXP_CORE wxStaticText;
00019 class WXDLLIMPEXP_CORE wxTextCtrl;
00020 class WXDLLIMPEXP_CORE wxCheckBox;
00021 class WXDLLIMPEXP_CORE wxStaticBitmap;
00022
00023
00024
00025
00026
00028 enum
00029 {
00030 wxCCSP_PROXY_OPTIONS = 0x0040,
00031 wxCCSP_AUTHENTICATION_OPTIONS = 0x0080,
00032 wxCCSP_PORT_OPTION = 0x0100,
00033
00034 wxCCSP_DEFAULT_STYLE = wxCCSP_PROXY_OPTIONS|wxCCSP_AUTHENTICATION_OPTIONS|wxCCSP_PORT_OPTION
00035 };
00036
00040 class WXDLLIMPEXP_CURL wxCurlConnectionSettingsPanel : public wxPanel
00041 {
00042 public:
00043 wxCurlConnectionSettingsPanel()
00044 {
00045 m_pUsername = NULL;
00046 m_pPassword = NULL;
00047 m_pPort = NULL;
00048
00049 m_pProxyCheckBox = NULL;
00050 m_pProxyHost = NULL;
00051 m_pProxyUsername = NULL;
00052 m_pProxyPassword = NULL;
00053 m_pProxyPort = NULL;
00054 }
00055
00056 wxCurlConnectionSettingsPanel(wxWindow* parent, wxWindowID id = wxID_ANY,
00057 const wxString &msg = wxEmptyString,
00058 const wxPoint& pos = wxDefaultPosition,
00059 const wxSize& size = wxDefaultSize,
00060 long style = wxCCSP_DEFAULT_STYLE,
00061 const wxString& name = wxT("connsettingspanel"))
00062 { Create(parent, id, msg, pos, size, style, name); }
00063
00064 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString &msg = wxEmptyString,
00065 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
00066 long style = wxCCSP_DEFAULT_STYLE, const wxString& name = wxT("connsettingspanel"));
00067
00068
00070 void SetCURLOptions(wxCurlBase *);
00071
00072
00073 public:
00074
00075 void OnUseProxy(wxCommandEvent &ev);
00076
00077 protected:
00078
00079 wxTextCtrl *AddSizerRow(wxSizer *sz, const wxString &name, bool grow = true);
00080 void CreateControls(const wxString &msg);
00081
00082 protected:
00083
00084 wxTextCtrl* m_pUsername;
00085 wxTextCtrl* m_pPassword;
00086 wxTextCtrl* m_pPort;
00087
00088 wxCheckBox* m_pProxyCheckBox;
00089 wxTextCtrl* m_pProxyHost;
00090 wxTextCtrl* m_pProxyUsername;
00091 wxTextCtrl* m_pProxyPassword;
00092 wxTextCtrl* m_pProxyPort;
00093
00094 private:
00095 DECLARE_EVENT_TABLE()
00096 DECLARE_DYNAMIC_CLASS(wxCurlConnectionSettingsPanel)
00097 };
00098
00099
00100 #endif // _WXCURL_PANEL_H_
00101