-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathImageTypePanel.cpp
74 lines (58 loc) · 1.11 KB
/
ImageTypePanel.cpp
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// wxWindows includes
#include <wx/wx.h>
#include <wx/sizer.h>
// Statsgen includes
#include "ImageTypePanel.h"
#include "Server.h"
#include "GlobalStatistics.h"
#include "WindowIDs.h"
wxString ImageTypePanel::GetLabel()
{
wxString label="Stat Type";
return (label);
}
wxString ImageTypePanel::AllName()
{
wxString all="All Stat Types";
return (all);
}
wxString ImageTypePanel::AllCode()
{
wxString all="";
return (all);
}
wxString ImageTypePanel::FindCodeFromName(wxString &name)
{
int count;
int index;
wxString foundName;
wxString retVal="";
count=IMAGE_TYPE_COUNT;
for (index=0;index<count;index++)
{
if (strcmp(ImageTypeNames[index],name.GetData())==0)
{
retVal=ImageTypeCodes[index];
}
}
return (retVal);
}
void ImageTypePanel::DropDownEntries(wxArrayString &entries,
wxString &defaultSelection)
{
int index;
wxString imageName;
int count;
entries.Clear();
defaultSelection="";
count=IMAGE_TYPE_COUNT;
for (index=0;index<count;index++)
{
imageName=ImageTypeNames[index];
entries.Add(imageName);
if (index==0)
{
defaultSelection=imageName;
}
}
}