use without url
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4669dcb216
commit
16cafacf24
@ -76,8 +76,10 @@ public:
|
|||||||
void OnTest3(wxCommandEvent& event);
|
void OnTest3(wxCommandEvent& event);
|
||||||
void OnCloseConnection(wxCommandEvent& event);
|
void OnCloseConnection(wxCommandEvent& event);
|
||||||
|
|
||||||
|
#if wxUSE_URL
|
||||||
// event handlers for Protocols menu
|
// event handlers for Protocols menu
|
||||||
void OnTestURL(wxCommandEvent& event);
|
void OnTestURL(wxCommandEvent& event);
|
||||||
|
#endif
|
||||||
|
|
||||||
// event handlers for DatagramSocket menu (stub)
|
// event handlers for DatagramSocket menu (stub)
|
||||||
void OnDatagram(wxCommandEvent& event);
|
void OnDatagram(wxCommandEvent& event);
|
||||||
@ -117,7 +119,9 @@ enum
|
|||||||
CLIENT_TEST2,
|
CLIENT_TEST2,
|
||||||
CLIENT_TEST3,
|
CLIENT_TEST3,
|
||||||
CLIENT_CLOSE,
|
CLIENT_CLOSE,
|
||||||
|
#if wxUSE_URL
|
||||||
CLIENT_TESTURL,
|
CLIENT_TESTURL,
|
||||||
|
#endif
|
||||||
CLIENT_DGRAM,
|
CLIENT_DGRAM,
|
||||||
|
|
||||||
// id for socket
|
// id for socket
|
||||||
@ -137,7 +141,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(CLIENT_TEST3, MyFrame::OnTest3)
|
EVT_MENU(CLIENT_TEST3, MyFrame::OnTest3)
|
||||||
EVT_MENU(CLIENT_CLOSE, MyFrame::OnCloseConnection)
|
EVT_MENU(CLIENT_CLOSE, MyFrame::OnCloseConnection)
|
||||||
EVT_MENU(CLIENT_DGRAM, MyFrame::OnDatagram)
|
EVT_MENU(CLIENT_DGRAM, MyFrame::OnDatagram)
|
||||||
|
#if wxUSE_URL
|
||||||
EVT_MENU(CLIENT_TESTURL, MyFrame::OnTestURL)
|
EVT_MENU(CLIENT_TESTURL, MyFrame::OnTestURL)
|
||||||
|
#endif
|
||||||
EVT_SOCKET(SOCKET_ID, MyFrame::OnSocketEvent)
|
EVT_SOCKET(SOCKET_ID, MyFrame::OnSocketEvent)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@ -194,15 +200,19 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY,
|
|||||||
m_menuDatagramSocket = new wxMenu();
|
m_menuDatagramSocket = new wxMenu();
|
||||||
m_menuDatagramSocket->Append(CLIENT_DGRAM, _("Send Datagram"), _("Test UDP sockets"));
|
m_menuDatagramSocket->Append(CLIENT_DGRAM, _("Send Datagram"), _("Test UDP sockets"));
|
||||||
|
|
||||||
|
#if wxUSE_URL
|
||||||
m_menuProtocols = new wxMenu();
|
m_menuProtocols = new wxMenu();
|
||||||
m_menuProtocols->Append(CLIENT_TESTURL, _("Test URL"), _("Get data from the specified URL"));
|
m_menuProtocols->Append(CLIENT_TESTURL, _("Test URL"), _("Get data from the specified URL"));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Append menus to the menubar
|
// Append menus to the menubar
|
||||||
m_menuBar = new wxMenuBar();
|
m_menuBar = new wxMenuBar();
|
||||||
m_menuBar->Append(m_menuFile, _("&File"));
|
m_menuBar->Append(m_menuFile, _("&File"));
|
||||||
m_menuBar->Append(m_menuSocket, _("&SocketClient"));
|
m_menuBar->Append(m_menuSocket, _("&SocketClient"));
|
||||||
m_menuBar->Append(m_menuDatagramSocket, _("&DatagramSocket"));
|
m_menuBar->Append(m_menuDatagramSocket, _("&DatagramSocket"));
|
||||||
|
#if wxUSE_URL
|
||||||
m_menuBar->Append(m_menuProtocols, _("&Protocols"));
|
m_menuBar->Append(m_menuProtocols, _("&Protocols"));
|
||||||
|
#endif
|
||||||
SetMenuBar(m_menuBar);
|
SetMenuBar(m_menuBar);
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
@ -533,6 +543,8 @@ void MyFrame::OnDatagram(wxCommandEvent& WXUNUSED(event))
|
|||||||
m_text->AppendText(_("=== Datagram test ends ===\n"));
|
m_text->AppendText(_("=== Datagram test ends ===\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_URL
|
||||||
|
|
||||||
void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// Note that we are creating a new socket here, so this
|
// Note that we are creating a new socket here, so this
|
||||||
@ -590,6 +602,8 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event))
|
|||||||
delete data;
|
delete data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void MyFrame::OnSocketEvent(wxSocketEvent& event)
|
void MyFrame::OnSocketEvent(wxSocketEvent& event)
|
||||||
{
|
{
|
||||||
wxString s = _("OnSocketEvent: ");
|
wxString s = _("OnSocketEvent: ");
|
||||||
|
Loading…
Reference in New Issue
Block a user