Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE release was in early 2013 and the PocketPC and Smartphone targets supported by wxWidgets are long gone. The build files where already removed in an earlier cleanup this commit removes all files, every #ifdef and all documentation regarding the Windows CE support. Closes https://github.com/wxWidgets/wxWidgets/pull/81
This commit is contained in:
committed by
Vadim Zeitlin
parent
6fbc2bd0b7
commit
8282c1be0f
@@ -357,9 +357,7 @@ bool MyApp::OnInit()
|
||||
|
||||
// Create the main application window
|
||||
MyFrame *frame = new MyFrame(wxT("Calendar wxWidgets sample")
|
||||
#ifndef __WXWINCE__
|
||||
,wxPoint(50, 50), wxSize(450, 340)
|
||||
#endif
|
||||
);
|
||||
|
||||
frame->Show(true);
|
||||
|
@@ -1675,10 +1675,6 @@ void MyFrame::FileOpenGeneric(wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
void MyFrame::FilesOpenGeneric(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
// On PocketPC you can disable OK-only dialogs policy using system option
|
||||
int buttons = wxSystemOptions::GetOptionInt(wxT("wince.dialog.real-ok-cancel"));
|
||||
wxSystemOptions::SetOption(wxT("wince.dialog.real-ok-cancel"), 1);
|
||||
|
||||
wxString wildcards = wxT("All files (*.*)|*.*|C++ files (*.cpp;*.h)|*.cpp;*.h");
|
||||
wxGenericFileDialog dialog(this, wxT("Testing open multiple file dialog"),
|
||||
wxEmptyString, wxEmptyString, wildcards,
|
||||
@@ -1706,9 +1702,6 @@ void MyFrame::FilesOpenGeneric(wxCommandEvent& WXUNUSED(event) )
|
||||
wxMessageDialog dialog2(this, msg, wxT("Selected files"));
|
||||
dialog2.ShowModal();
|
||||
}
|
||||
|
||||
// restore system option
|
||||
wxSystemOptions::SetOption(wxT("wince.dialog.real-ok-cancel"), buttons);
|
||||
}
|
||||
|
||||
void MyFrame::FileSaveGeneric(wxCommandEvent& WXUNUSED(event) )
|
||||
@@ -2695,9 +2688,7 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.DrawText(
|
||||
wxT("wxWidgets common dialogs")
|
||||
#if !defined(__SMARTPHONE__)
|
||||
wxT(" test application")
|
||||
#endif
|
||||
, 10, 10);
|
||||
}
|
||||
|
||||
|
@@ -34,13 +34,7 @@ of MSW, MAC and OS2
|
||||
#define USE_DLL 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXWINCE__)
|
||||
#define USE_WXWINCE 1
|
||||
#else
|
||||
#define USE_WXWINCE 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && !USE_WXWINCE
|
||||
#if defined(__WXMSW__)
|
||||
#define USE_WXMSW 1
|
||||
#else
|
||||
#define USE_WXMSW 0
|
||||
@@ -72,13 +66,13 @@ of MSW, MAC and OS2
|
||||
((USE_WXMSW || USE_WXMAC) && USE_GENERIC_DIALOGS && wxUSE_DIRDLG)
|
||||
#define USE_FILEDLG_GENERIC \
|
||||
((((USE_WXMSW || USE_WXMAC || USE_WXGTK) \
|
||||
&& USE_GENERIC_DIALOGS) || USE_WXWINCE) && wxUSE_FILEDLG)
|
||||
&& USE_GENERIC_DIALOGS) ) && wxUSE_FILEDLG)
|
||||
#define USE_FONTDLG_GENERIC \
|
||||
((USE_WXMSW || USE_WXMACFONTDLG) && USE_GENERIC_DIALOGS && wxUSE_FONTDLG)
|
||||
|
||||
// Turn USE_MODAL_PRESENTATION to 0 if there is any reason for not presenting difference
|
||||
// between modal and modeless dialogs (ie. not implemented it in your port yet)
|
||||
#if defined(__SMARTPHONE__) || !wxUSE_BOOKCTRL
|
||||
#if !wxUSE_BOOKCTRL
|
||||
#define USE_MODAL_PRESENTATION 0
|
||||
#else
|
||||
#define USE_MODAL_PRESENTATION 1
|
||||
|
@@ -449,7 +449,7 @@ MyFrame::MyFrame()
|
||||
SetMenuBar(menuBar);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR && !defined(__WXWINCE__)
|
||||
#if wxUSE_STATUSBAR
|
||||
// create a status bar just for fun (by default with 1 pane only)
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(wxT("Welcome to wxWidgets!"));
|
||||
|
@@ -27,21 +27,18 @@
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
|
||||
<!-- WinCE doesn't have console applications: -->
|
||||
<if cond="FORMAT!='msevc4prj'">
|
||||
<exe id="baseipcclient" template="wx_sample_console" template_append="wx_append_base">
|
||||
<sources>baseclient.cpp</sources>
|
||||
<headers>connection.h ipcsetup.h</headers>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
<exe id="baseipcclient" template="wx_sample_console" template_append="wx_append_base">
|
||||
<sources>baseclient.cpp</sources>
|
||||
<headers>connection.h ipcsetup.h</headers>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
|
||||
<exe id="baseipcserver" template="wx_sample_console" template_append="wx_append_base">
|
||||
<sources>baseserver.cpp</sources>
|
||||
<headers>connection.h ipcsetup.h</headers>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
</if>
|
||||
<exe id="baseipcserver" template="wx_sample_console" template_append="wx_append_base">
|
||||
<sources>baseserver.cpp</sources>
|
||||
<headers>connection.h ipcsetup.h</headers>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
|
||||
</makefile>
|
||||
|
@@ -40,9 +40,6 @@ public:
|
||||
{
|
||||
m_updated = -1;
|
||||
|
||||
#ifdef __POCKETPC__
|
||||
EnableContextMenu();
|
||||
#endif
|
||||
}
|
||||
|
||||
// add one item to the listctrl in report mode
|
||||
|
@@ -680,9 +680,6 @@ MyFrame::MyFrame()
|
||||
wxT("menubar itself.\n\n")
|
||||
wxT("Right click the band below to test popup menus.\n"));
|
||||
#endif
|
||||
#ifdef __POCKETPC__
|
||||
EnableContextMenu();
|
||||
#endif
|
||||
}
|
||||
|
||||
MyFrame::~MyFrame()
|
||||
@@ -1330,9 +1327,6 @@ MyDialog::MyDialog(wxWindow* parent)
|
||||
m_textctrl->AppendText(wxT("Dialogs do not have menus, but popup menus should function the same\n\n")
|
||||
wxT("Right click this text ctrl to test popup menus.\n"));
|
||||
#endif
|
||||
#ifdef __POCKETPC__
|
||||
EnableContextMenu();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if USE_LOG_WINDOW
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include "wx/toolbook.h"
|
||||
#include "wx/aui/auibook.h"
|
||||
|
||||
#if wxUSE_LOG && !defined( __SMARTPHONE__ )
|
||||
#if wxUSE_LOG
|
||||
#define USE_LOG 1
|
||||
#else
|
||||
#define USE_LOG 0
|
||||
|
@@ -316,12 +316,6 @@ bool MyApp::OnInit()
|
||||
|
||||
void MyFrame::RecreateToolbar()
|
||||
{
|
||||
#ifdef __WXWINCE__
|
||||
// On Windows CE, we should not delete the
|
||||
// previous toolbar in case it contains the menubar.
|
||||
// We'll try to accommodate this usage in due course.
|
||||
wxToolBar* toolBar = CreateToolBar();
|
||||
#else
|
||||
// delete and recreate the toolbar
|
||||
wxToolBarBase *toolBar = GetToolBar();
|
||||
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
|
||||
@@ -363,7 +357,6 @@ void MyFrame::RecreateToolbar()
|
||||
style |= wxTB_HORZ_LAYOUT;
|
||||
|
||||
toolBar = CreateToolBar(style, ID_TOOLBAR);
|
||||
#endif
|
||||
|
||||
PopulateToolbar(toolBar);
|
||||
}
|
||||
|
@@ -121,12 +121,7 @@ protected:
|
||||
wxCheckBox *m_chkSort;
|
||||
|
||||
// the choice itself and the sizer it is in
|
||||
#ifdef __WXWINCE__
|
||||
wxChoiceBase
|
||||
#else
|
||||
wxChoice
|
||||
#endif
|
||||
*m_choice;
|
||||
wxChoice *m_choice;
|
||||
|
||||
wxSizer *m_sizerChoice;
|
||||
|
||||
|
@@ -156,12 +156,7 @@ protected:
|
||||
*m_chkOwnerDraw;
|
||||
|
||||
// the listbox itself and the sizer it is in
|
||||
#ifdef __WXWINCE__
|
||||
wxListBoxBase
|
||||
#else
|
||||
wxListBox
|
||||
#endif
|
||||
*m_lbox;
|
||||
wxListBox *m_lbox;
|
||||
|
||||
wxSizer *m_sizerLbox;
|
||||
|
||||
|
@@ -121,10 +121,8 @@ protected:
|
||||
void RecreateBook();
|
||||
virtual wxBookCtrlBase *CreateBook(long flags) = 0;
|
||||
|
||||
#if USE_ICONS_IN_BOOK
|
||||
// create or destroy the image list
|
||||
void CreateImageList();
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
// create a new page
|
||||
wxWindow *CreateNewPage();
|
||||
@@ -155,10 +153,8 @@ protected:
|
||||
wxBookCtrlBase *m_book;
|
||||
wxSizer *m_sizerBook;
|
||||
|
||||
#if USE_ICONS_IN_BOOK
|
||||
// the image list for our book
|
||||
wxImageList *m_imageList;
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
@@ -196,9 +192,7 @@ BookWidgetsPage::BookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist, c
|
||||
{
|
||||
// init everything
|
||||
m_chkImages = NULL;
|
||||
#if USE_ICONS_IN_BOOK
|
||||
m_imageList = NULL;
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
m_book = NULL;
|
||||
m_radioOrient = NULL;
|
||||
@@ -289,18 +283,14 @@ void BookWidgetsPage::CreateContent()
|
||||
|
||||
// final initializations
|
||||
Reset();
|
||||
#if USE_ICONS_IN_BOOK
|
||||
CreateImageList();
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
SetSizer(sizerTop);
|
||||
}
|
||||
|
||||
BookWidgetsPage::~BookWidgetsPage()
|
||||
{
|
||||
#if USE_ICONS_IN_BOOK
|
||||
delete m_imageList;
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -313,7 +303,6 @@ void BookWidgetsPage::Reset()
|
||||
m_radioOrient->SetSelection(Orient_Top);
|
||||
}
|
||||
|
||||
#if USE_ICONS_IN_BOOK
|
||||
void BookWidgetsPage::CreateImageList()
|
||||
{
|
||||
if ( m_chkImages->GetValue() )
|
||||
@@ -341,7 +330,6 @@ void BookWidgetsPage::CreateImageList()
|
||||
// it would be logical if this removed the image list from book, under
|
||||
// MSW it crashes instead - FIXME
|
||||
}
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
void BookWidgetsPage::RecreateBook()
|
||||
{
|
||||
@@ -378,9 +366,7 @@ void BookWidgetsPage::RecreateBook()
|
||||
|
||||
m_book = CreateBook(flags);
|
||||
|
||||
#if USE_ICONS_IN_BOOK
|
||||
CreateImageList();
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
if ( oldBook )
|
||||
{
|
||||
@@ -429,7 +415,6 @@ int BookWidgetsPage::GetTextValue(wxTextCtrl *text) const
|
||||
|
||||
int BookWidgetsPage::GetIconIndex() const
|
||||
{
|
||||
#if USE_ICONS_IN_BOOK
|
||||
if ( m_imageList )
|
||||
{
|
||||
int nImages = m_imageList->GetImageCount();
|
||||
@@ -438,7 +423,6 @@ int BookWidgetsPage::GetIconIndex() const
|
||||
return m_book->GetPageCount() % nImages;
|
||||
}
|
||||
}
|
||||
#endif // USE_ICONS_IN_BOOK
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@@ -474,7 +474,6 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
|
||||
InitBook();
|
||||
|
||||
#ifndef __WXHANDHELD__
|
||||
// the lower one only has the log listbox and a button to clear it
|
||||
#if USE_LOG
|
||||
wxSizer *sizerDown = new wxStaticBoxSizer(
|
||||
@@ -504,12 +503,6 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
sizerTop->Add(0, 5, 0, wxGROW); // spacer in between
|
||||
sizerTop->Add(sizerDown, 0, wxGROW | (wxALL & ~wxTOP), 10);
|
||||
|
||||
#else // !__WXHANDHELD__/__WXHANDHELD__
|
||||
|
||||
sizerTop->Add(m_book, 1, wxGROW | wxALL );
|
||||
|
||||
#endif // __WXHANDHELD__
|
||||
|
||||
m_panel->SetSizer(sizerTop);
|
||||
|
||||
const wxSize sizeMin = m_panel->GetBestSize();
|
||||
@@ -527,14 +520,10 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
|
||||
void WidgetsFrame::InitBook()
|
||||
{
|
||||
#if USE_ICONS_IN_BOOK
|
||||
wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE);
|
||||
|
||||
wxImage img(sample_xpm);
|
||||
imageList->Add(wxBitmap(img.Scale(ICON_SIZE, ICON_SIZE)));
|
||||
#else
|
||||
wxImageList *imageList = NULL;
|
||||
#endif
|
||||
|
||||
#if !USE_TREEBOOK
|
||||
WidgetsBookCtrl *books[MAX_PAGES];
|
||||
@@ -608,9 +597,7 @@ void WidgetsFrame::InitBook()
|
||||
|
||||
GetMenuBar()->Append(menuPages, wxT("&Page"));
|
||||
|
||||
#if USE_ICONS_IN_BOOK
|
||||
m_book->AssignImageList(imageList);
|
||||
#endif
|
||||
|
||||
for ( cat = 0; cat < MAX_PAGES; cat++ )
|
||||
{
|
||||
@@ -618,9 +605,7 @@ void WidgetsFrame::InitBook()
|
||||
m_book->AddPage(NULL,WidgetsCategories[cat],false,0);
|
||||
#else
|
||||
m_book->AddPage(books[cat],WidgetsCategories[cat],false,0);
|
||||
#if USE_ICONS_IN_BOOK
|
||||
books[cat]->SetImageList(imageList);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// now do add them
|
||||
@@ -1242,12 +1227,7 @@ WidgetsPage::WidgetsPage(WidgetsBookCtrl *book,
|
||||
wxCLIP_CHILDREN |
|
||||
wxTAB_TRAVERSAL)
|
||||
{
|
||||
#if USE_ICONS_IN_BOOK
|
||||
imaglist->Add(wxBitmap(wxImage(icon).Scale(ICON_SIZE, ICON_SIZE)));
|
||||
#else
|
||||
wxUnusedVar(imaglist);
|
||||
wxUnusedVar(icon);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#ifndef _WX_SAMPLE_WIDGETS_H_
|
||||
#define _WX_SAMPLE_WIDGETS_H_
|
||||
|
||||
#if wxUSE_TREEBOOK && !defined(__WXHANDHELD__)
|
||||
#if wxUSE_TREEBOOK
|
||||
#include "wx/treebook.h"
|
||||
#define USE_TREEBOOK 1
|
||||
#define WidgetsBookCtrl wxTreebook
|
||||
@@ -29,18 +29,13 @@
|
||||
#define wxWidgetsbookEventHandler(func) wxBookCtrlEventHandler(func)
|
||||
#endif
|
||||
|
||||
#if wxUSE_LOG && !defined(__WXHANDHELD__)
|
||||
#if wxUSE_LOG
|
||||
#define USE_LOG 1
|
||||
#else
|
||||
#define USE_LOG 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXHANDHELD__)
|
||||
#define USE_ICONS_IN_BOOK 0
|
||||
#else
|
||||
#define USE_ICONS_IN_BOOK 1
|
||||
#define ICON_SIZE 16
|
||||
#endif
|
||||
#define ICON_SIZE 16
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxCheckBox;
|
||||
class WXDLLIMPEXP_FWD_CORE wxSizer;
|
||||
|
Reference in New Issue
Block a user