Implement wxSTCListBox using wxVListBox
Previously wxSTCListBox was a class derived from wxListView and required several extra steps to make the control look correct when it lacked focus. This commit changes wxSTCListBox so that it is a wxVListBox and is built to always draw itself looking as though it has focus. In addition this splits the work previously done by ListBoxImpl class among wxSTCListBox and a newly defined wxSTCListBoxVisualData class. wxSTCListBox manages the work done by a specific list and wxSTCListBoxVisualData manages the data common to all lists. All ListBoxImpl methods now simply forward to a method of one of those 2 classes.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,8 @@
|
||||
#include "Platform.h"
|
||||
|
||||
class wxStyledTextCtrl;
|
||||
|
||||
class wxSTCListBox;
|
||||
class wxSTCListBoxVisualData;
|
||||
|
||||
|
||||
|
||||
@@ -19,14 +20,8 @@ wxColour wxColourFromCD(const ColourDesired& ca);
|
||||
|
||||
class ListBoxImpl : public ListBox {
|
||||
private:
|
||||
int lineHeight;
|
||||
bool unicodeMode;
|
||||
int desiredVisibleRows;
|
||||
int aveCharWidth;
|
||||
size_t maxStrWidth;
|
||||
Point location; // Caret location at which the list is opened
|
||||
wxImageList* imgList;
|
||||
wxArrayInt* imgTypeMap;
|
||||
wxSTCListBox* m_listBox;
|
||||
wxSTCListBoxVisualData* m_visualData;
|
||||
|
||||
public:
|
||||
ListBoxImpl();
|
||||
|
Reference in New Issue
Block a user