From be3b47d0d504a3409ce66bd77bb8c0acff87c4f5 Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 15 Mar 2012 14:53:47 +0100 Subject: Reorganize the tree, have better ifw.pri. Shadow build support. Change-Id: I01fb12537f863ed0744979973c7e4153889cc5cb Reviewed-by: Tim Jenssen --- src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h (limited to 'src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h') diff --git a/src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h b/src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h new file mode 100644 index 000000000..8717b4867 --- /dev/null +++ b/src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h @@ -0,0 +1,82 @@ +// Windows/Control/ComboBox.h + +#ifndef __WINDOWS_WX_CONTROL_COMBOBOX_H +#define __WINDOWS_WX_CONTROL_COMBOBOX_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + + +#include "Windows/Control/Window2.h" // NMHDR + +#ifndef _WIN32 +#define CB_ERR (-1) // wxNOT_FOUND +#endif + +typedef struct +{ + NMHDR hdr; +#define CBENF_ESCAPE 1 +#define CBENF_RETURN 2 + int iWhy; +} NMCBEENDEDITW; + +typedef NMCBEENDEDITW * PNMCBEENDEDITW; + + +class wxComboBox; + +namespace NWindows { + namespace NControl { + + class CComboBox // : public CWindow + { + wxComboBox* _choice; + public: + CComboBox() : _choice(0) {} + + void Attach(wxWindow * newWindow); + wxWindow * Detach(); + operator HWND() const; + + int AddString(const TCHAR * txt); + + void SetText(LPCTSTR s); + + void GetText(CSysString &s); + + int GetCount() const ; + void GetLBText(int index, CSysString &s); + + void SetCurSel(int index); + int GetCurSel(); + + void SetItemData(int index, int val); + + int GetItemData(int index); + + void Enable(bool state); + + void ResetContent(); + }; + + class CComboBoxEx : public CComboBox // : public CWindow + { + public: + /* FIXME + LRESULT DeleteItem(int index) + { return SendMessage(CBEM_DELETEITEM, index, 0); } + LRESULT InsertItem(COMBOBOXEXITEM *item) + { return SendMessage(CBEM_INSERTITEM, 0, (LPARAM)item); } + DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle) + { return (DWORD)SendMessage(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); } + HWND GetEditControl() + { return (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0); } + */ + }; + + + } +} + +#endif // __WINDOWS_WX_CONTROL_COMBOBOX_H -- cgit v1.2.3