]>
Commit | Line | Data |
---|---|---|
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 | |
526954c5 | 6 | // License: wxWindows licence |
a236aa20 VZ |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
9 | #ifndef _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_ | |
10 | #define _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_ | |
11 | ||
a236aa20 VZ |
12 | #include "widgets.h" |
13 | ||
14 | class ItemContainerWidgetsPage : public WidgetsPage | |
15 | { | |
16 | public: | |
17 | ItemContainerWidgetsPage(WidgetsBookCtrl *book, | |
18 | wxImageList *image_list, | |
747d7d7c | 19 | const char *const icon[]); |
a236aa20 VZ |
20 | virtual ~ItemContainerWidgetsPage(); |
21 | ||
22 | void OnButtonTestItemContainer(wxCommandEvent& event); | |
23 | ||
24 | virtual wxItemContainer* GetContainer() const = 0; | |
25 | ||
26 | private: | |
27 | void StartTest(const wxString& label); | |
2549484f | 28 | void EndTest(const wxArrayString& result); |
a236aa20 VZ |
29 | |
30 | // Track client data in wxItemContainer instances | |
31 | wxClientData* CreateClientData(int value); | |
32 | void StartTrackingData(); | |
33 | void StopTrackingData(); | |
34 | friend class TrackedClientData; | |
35 | ||
36 | bool VerifyAllClientDataDestroyed(); | |
37 | bool VerifyClientData(wxUIntPtr i, const wxString& str); | |
38 | ||
2549484f VZ |
39 | wxString DumpContainerData(const wxArrayString& expected) const; |
40 | ||
41 | static wxArrayString MakeArray(const wxSortedArrayString& sorted); | |
a236aa20 VZ |
42 | |
43 | wxArrayString m_items; | |
44 | wxSortedArrayString m_itemsSorted; | |
45 | int m_trackedDataObjects; | |
46 | ||
47 | // holds pointer to the widget being tested | |
48 | wxItemContainer *m_container; | |
49 | }; | |
50 | ||
51 | #endif // _WX_SAMPLE_WIDGETS_ITEMCONTAINER_H_ |