Fixed some bugs to make GCC work. I needed to change SimpleValueAction to take the function as a variable as opposed to a template parameter - GCC won't accept pointers from a base class in templates.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@231 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-03-23 00:57:06 +00:00
parent 0fbd417057
commit 851799d1b6
27 changed files with 215 additions and 129 deletions
+1 -1
View File
@@ -67,8 +67,8 @@ END_EVENT_TABLE ()
HoverButton::HoverButton(Window* parent, int id, const String& name, const Color& background)
: wxControl(parent, id, wxDefaultPosition, wxDefaultSize, wxNO_BORDER )
, hover(false), focus(false), mouse_down(false), key_down(false)
, last_drawn(nullptr)
, background(background)
, last_drawn(nullptr)
{
loadBitmaps(name);
SetSize(DoGetBestSize());
+1 -1
View File
@@ -38,8 +38,8 @@ class GalleryList : public wxScrolledWindow {
static const size_t NO_SELECTION = (size_t)-1;
size_t selection; ///< The selected item, or NO_SELECTION if there is no selection
wxSize item_size; ///< The size of a single item
int scroll_increment; ///< How large are the scroll steps?
int direction; ///< Direction of the list, can be wxHORIZONTAL or wxVERTICAL
int scroll_increment; ///< How large are the scroll steps?
/// Redraw the list after changing the selection or the number of items
void update();
+1 -1
View File
@@ -16,8 +16,8 @@
SymbolBasicShapeEditor::SymbolBasicShapeEditor(SymbolControl* control)
: SymbolEditorBase(control)
, drawing(false)
, mode(ID_SHAPE_CIRCLE)
, drawing(false)
{
control->SetCursor(*wxCROSS_CURSOR);
}
+2 -2
View File
@@ -152,7 +152,7 @@ void SymbolControl::draw(DC& dc) {
wxSize s = dc.GetSize();
int lines = settings.symbol_grid_size;
for (int i = 0 ; i <= lines ; ++i) {
int x = rotation.trS((double)i/lines-0.0001);
int x = (int) rotation.trS(i/lines-0.0001);
//dc.SetPen(Color(0, i%5 == 0 ? 64 : 31, 0));
//dc.SetPen(Color(i%5 == 0 ? 64 : 31, 0, 0));
dc.SetLogicalFunction(wxAND);
@@ -270,4 +270,4 @@ BEGIN_EVENT_TABLE(SymbolControl, wxControl)
EVT_KEY_UP (SymbolControl::onKeyChange)
EVT_KEY_DOWN (SymbolControl::onKeyChange)
EVT_CHAR (SymbolControl::onChar)
END_EVENT_TABLE ()
END_EVENT_TABLE ()
+2 -2
View File
@@ -85,13 +85,13 @@ Image load_resource_image(const String& name) {
char* data = (char *)::LockResource(hData);
if ( !data ) throw InternalError(String::Format(_("Resource cannot be locked: %s"), name));
int len = ::SizeofResource(wxGetInstance(), hResource);
wxMemoryInputStream stream(data, len);
return wxImage(stream);
#elif defined(__linux__)
static String path = wxStandardPaths::Get().GetDataDir() + _("/resource/");
String file = path + name; // if the name is in upper case, fix the call
String file = path + name;
wxImage resource;
if (wxFileExists(file + _(".png"))) resource.LoadFile(file + _(".png"));
else if (wxFileExists(file + _(".bmp"))) resource.LoadFile(file + _(".bmp"));