forked from mapic91/JxqyScriptEidtor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTalkListPanel.h
47 lines (40 loc) · 1.35 KB
/
TalkListPanel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef TALKLISTPANEL_H
#define TALKLISTPANEL_H
#include "wxFormBuilder/TalkListPanelBase.h"
#include "TalkIndex.h"
class TalkListPanel : public TalkListPanelBase
{
public:
TalkListPanel(wxWindow *parent);
virtual ~TalkListPanel();
protected:
void InitFromTalkList();
virtual void OnClose( wxCloseEvent& event );
virtual void OnItemEdited( wxDataViewEvent& event );
virtual void OnAdd( wxCommandEvent& event );
virtual void OnInsert( wxCommandEvent& event );
virtual void OnDelete( wxCommandEvent& event );
virtual void OnGoto( wxCommandEvent& event );
virtual void OnSave( wxCommandEvent& event );
virtual void OnSaveTxt( wxCommandEvent& event );
private:
wxVector<wxVariant> CreateItemData(int itemIndex, int portraitIndex, const wxString &text);
int AppendItem(TalkDetail* detail);
int AppendItem(int itemIndex, int portraitIndex = 0, const wxString &text = wxEmptyString);
int InsertItem(int row, int itemIndex, int portraitIndex = 0, const wxString &text = wxEmptyString);
void SelectAndShowRow(int row);
int GetItemIndex(int row);
private:
enum
{
INDEX_COLUMN,
PORTRAIT_COLUMN,
TEXT_COLUMN
};
//TalkIndex
TalkIndex m_talkList;
wxDataViewColumn* m_columnIndex;
wxDataViewColumn* m_columnPortrait;
wxDataViewColumn* m_columnText;
};
#endif // TALKLISTPANEL_H