]> git.saurik.com Git - wxWidgets.git/blame - samples/widgets/itemcontainer.h
Add an option to use wxTextCtrl as input window in keyboard sample.
[wxWidgets.git] / samples / widgets / itemcontainer.h
CommitLineData
a236aa20
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Program: wxWidgets Widgets Sample
3// Name: itemcontainer.h
4// Purpose: Part of the widgets sample showing wxComboBox
5// Created: 20.07.07
6// Id: $Id$
526954c5 7// License: wxWindows licence
a236aa20
VZ
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_
11#define _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_
12
a236aa20
VZ
13#include "widgets.h"
14
15class ItemContainerWidgetsPage : public WidgetsPage
16{
17public:
18 ItemContainerWidgetsPage(WidgetsBookCtrl *book,
19 wxImageList *image_list,
747d7d7c 20 const char *const icon[]);
a236aa20
VZ
21 virtual ~ItemContainerWidgetsPage();
22
23 void OnButtonTestItemContainer(wxCommandEvent& event);
24
25 virtual wxItemContainer* GetContainer() const = 0;
26
27private:
28 void StartTest(const wxString& label);
2549484f 29 void EndTest(const wxArrayString& result);
a236aa20
VZ
30
31 // Track client data in wxItemContainer instances
32 wxClientData* CreateClientData(int value);
33 void StartTrackingData();
34 void StopTrackingData();
35 friend class TrackedClientData;
36
37 bool VerifyAllClientDataDestroyed();
38 bool VerifyClientData(wxUIntPtr i, const wxString& str);
39
2549484f
VZ
40 wxString DumpContainerData(const wxArrayString& expected) const;
41
42 static wxArrayString MakeArray(const wxSortedArrayString& sorted);
a236aa20
VZ
43
44 wxArrayString m_items;
45 wxSortedArrayString m_itemsSorted;
46 int m_trackedDataObjects;
47
48 // holds pointer to the widget being tested
49 wxItemContainer *m_container;
50};
51
52#endif // _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_