Eliminated most build errors (gcc,linux,wxGTK).

What is left is mostly:
 - warning: converting double to int
     -> add a cast/to_int or ignore
 - wrong initialization order in ctor
     -> just swap the order to match the class
 - errors about wxCursors
     -> add a function loadResourceCursor


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@183 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-01-29 00:04:20 +00:00
parent 1cd80a3710
commit 3d9181e5f6
42 changed files with 151 additions and 125 deletions
+2 -2
View File
@@ -23,8 +23,8 @@ class ChoiceThumbnailRequest : public ThumbnailRequest {
virtual Image generate();
virtual void store(const Image&);
private:
int id;
StyleSheetP stylesheet;
int id;
};
ChoiceThumbnailRequest::ChoiceThumbnailRequest(ChoiceValueEditor* cve, int id)
@@ -84,8 +84,8 @@ void ChoiceThumbnailRequest::store(const Image& img) {
DropDownChoiceList::DropDownChoiceList(Window* parent, bool is_submenu, ChoiceValueEditor& cve, ChoiceField::ChoiceP group)
: DropDownList(parent, is_submenu, is_submenu ? nullptr : &cve)
, group(group)
, cve(cve)
, group(group)
{
icon_size.width = 16;
icon_size.height = 16;
+2 -2
View File
@@ -53,7 +53,7 @@ DropDownColorList::DropDownColorList(Window* parent, ColorValueEditor& cve)
{
icon_size.width = 25;
if (item_size.height < 16) {
text_offset = (16 - item_size.height) / 2;
text_offset = (16 - (int)item_size.height) / 2;
item_size.height = 16;
}
}
@@ -86,7 +86,7 @@ void DropDownColorList::drawIcon(DC& dc, int x, int y, size_t item, bool selecte
// draw a rectangle with the right color
dc.SetPen(wxSystemSettings::GetColour(selected ? wxSYS_COLOUR_HIGHLIGHTTEXT : wxSYS_COLOUR_WINDOWTEXT));
dc.SetBrush(col);
dc.DrawRectangle(x+1, y+1, icon_size.width-2, item_size.height-2);
dc.DrawRectangle(x+1, y+1, (int)icon_size.width-2, (int)item_size.height-2);
}
+1
View File
@@ -31,6 +31,7 @@
*/
class ValueEditor {
public:
virtual ~ValueEditor();
// --------------------------------------------------- : Events
/// This editor gains focus
+5 -5
View File
@@ -605,10 +605,10 @@ void TextValueEditor::determineSize(bool force_fit) {
if (!force_fit) style().height = 100;
int sbw = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
scrollbar->SetSize(
style().left + style().width - sbw + 1,
style().top - 1,
sbw,
style().height + 2);
(int)style().left + style().width - sbw + 1,
(int)style().top - 1,
(int)sbw,
(int)style().height + 2);
v.reset();
} else {
// Height depends on font
@@ -681,4 +681,4 @@ void TextValueEditor::prepareDrawScrollbar(RotatedDC& dc) {
updateScrollbar();
style().width.mutate() += scrollbar_width;
}
}
}
+4 -6
View File
@@ -84,8 +84,9 @@ class TextValueEditor : public TextValueViewer, public ValueEditor {
private:
size_t selection_start, selection_end; ///< Cursor position/selection (if any), cursor positions
size_t selection_start_i, selection_end_i; ///< Cursor position/selection, character indices
TextValueEditorScrollBar* scrollbar; ///< Scrollbar for multiline fields in native look
bool select_words; ///< Select whole words when dragging the mouse?
bool select_words; ///< Select whole words when dragging the mouse?
TextValueEditorScrollBar* scrollbar; ///< Scrollbar for multiline fields in native look
bool scroll_with_cursor; ///< When the cursor moves, should the scrollposition change?
// --------------------------------------------------- : Selection / movement
@@ -126,10 +127,7 @@ class TextValueEditor : public TextValueViewer, public ValueEditor {
// --------------------------------------------------- : Scrolling
friend class TextValueEditorScrollBar;
/// When the cursor moves, should the scrollposition change?
bool scroll_with_cursor;
/// Scroll to the given position, called by scrollbar
void scrollTo(int pos);
/// Update the scrollbar to show the current scroll position