More small devices adjustements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -119,8 +119,10 @@ protected:
 | 
				
			|||||||
    void RecreateBook();
 | 
					    void RecreateBook();
 | 
				
			||||||
    virtual wxBookCtrlBase *CreateBook(long flags) = 0;
 | 
					    virtual wxBookCtrlBase *CreateBook(long flags) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
    // create or destroy the image list
 | 
					    // create or destroy the image list
 | 
				
			||||||
    void CreateImageList();
 | 
					    void CreateImageList();
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // create a new page
 | 
					    // create a new page
 | 
				
			||||||
    wxWindow *CreateNewPage();
 | 
					    wxWindow *CreateNewPage();
 | 
				
			||||||
@@ -151,8 +153,10 @@ protected:
 | 
				
			|||||||
    wxBookCtrlBase *m_book;
 | 
					    wxBookCtrlBase *m_book;
 | 
				
			||||||
    wxSizer *m_sizerBook;
 | 
					    wxSizer *m_sizerBook;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // thei mage list for our book
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					    // the image list for our book
 | 
				
			||||||
    wxImageList *m_imageList;
 | 
					    wxImageList *m_imageList;
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    DECLARE_EVENT_TABLE()
 | 
					    DECLARE_EVENT_TABLE()
 | 
				
			||||||
@@ -190,7 +194,9 @@ BookWidgetsPage::BookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist, c
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    // init everything
 | 
					    // init everything
 | 
				
			||||||
    m_chkImages = NULL;
 | 
					    m_chkImages = NULL;
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
    m_imageList = NULL;
 | 
					    m_imageList = NULL;
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_book = NULL;
 | 
					    m_book = NULL;
 | 
				
			||||||
    m_sizerBook = (wxSizer *)NULL;
 | 
					    m_sizerBook = (wxSizer *)NULL;
 | 
				
			||||||
@@ -275,7 +281,9 @@ BookWidgetsPage::BookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist, c
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // final initializations
 | 
					    // final initializations
 | 
				
			||||||
    Reset();
 | 
					    Reset();
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
    CreateImageList();
 | 
					    CreateImageList();
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetSizer(sizerTop);
 | 
					    SetSizer(sizerTop);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -284,7 +292,9 @@ BookWidgetsPage::BookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist, c
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
BookWidgetsPage::~BookWidgetsPage()
 | 
					BookWidgetsPage::~BookWidgetsPage()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
    delete m_imageList;
 | 
					    delete m_imageList;
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
@@ -297,6 +307,7 @@ void BookWidgetsPage::Reset()
 | 
				
			|||||||
    m_radioOrient->SetSelection(Orient_Top);
 | 
					    m_radioOrient->SetSelection(Orient_Top);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
void BookWidgetsPage::CreateImageList()
 | 
					void BookWidgetsPage::CreateImageList()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if ( m_chkImages->GetValue() )
 | 
					    if ( m_chkImages->GetValue() )
 | 
				
			||||||
@@ -328,6 +339,7 @@ void BookWidgetsPage::CreateImageList()
 | 
				
			|||||||
    // it would be logical if this removed the image list from book, under
 | 
					    // it would be logical if this removed the image list from book, under
 | 
				
			||||||
    // MSW it crashes instead - FIXME
 | 
					    // MSW it crashes instead - FIXME
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void BookWidgetsPage::RecreateBook()
 | 
					void BookWidgetsPage::RecreateBook()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -359,7 +371,9 @@ void BookWidgetsPage::RecreateBook()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    m_book = CreateBook(flags);
 | 
					    m_book = CreateBook(flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
    CreateImageList();
 | 
					    CreateImageList();
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( oldBook )
 | 
					    if ( oldBook )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -407,6 +421,7 @@ int BookWidgetsPage::GetTextValue(wxTextCtrl *text) const
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int BookWidgetsPage::GetIconIndex() const
 | 
					int BookWidgetsPage::GetIconIndex() const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if USE_ICONS_IN_BOOK
 | 
				
			||||||
    if ( m_imageList )
 | 
					    if ( m_imageList )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
       int nImages = m_imageList->GetImageCount();
 | 
					       int nImages = m_imageList->GetImageCount();
 | 
				
			||||||
@@ -415,6 +430,7 @@ int BookWidgetsPage::GetIconIndex() const
 | 
				
			|||||||
           return m_book->GetPageCount() % nImages;
 | 
					           return m_book->GetPageCount() % nImages;
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					#endif // USE_ICONS_IN_BOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -325,7 +325,7 @@ bool WidgetsApp::OnInit()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
WidgetsFrame::WidgetsFrame(const wxString& title)
 | 
					WidgetsFrame::WidgetsFrame(const wxString& title)
 | 
				
			||||||
            : wxFrame(NULL, wxID_ANY, title,
 | 
					            : wxFrame(NULL, wxID_ANY, title,
 | 
				
			||||||
                      wxPoint(0, 50), wxDefaultSize,
 | 
					                      wxDefaultPosition, wxDefaultSize,
 | 
				
			||||||
                      wxDEFAULT_FRAME_STYLE |
 | 
					                      wxDEFAULT_FRAME_STYLE |
 | 
				
			||||||
                      wxNO_FULL_REPAINT_ON_RESIZE |
 | 
					                      wxNO_FULL_REPAINT_ON_RESIZE |
 | 
				
			||||||
                      wxCLIP_CHILDREN |
 | 
					                      wxCLIP_CHILDREN |
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user