mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #2 from lioncash/override
General: Use override where applicable
This commit is contained in:
commit
5307ab4107
|
@ -42,10 +42,10 @@ private:
|
|||
void setPressed();
|
||||
void setDisabled();
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
ButtonTarget(ViewResources& res, Button& button) : View(res, button), m_button(button) {}
|
||||
};
|
||||
ViewChild<std::unique_ptr<ButtonTarget>> m_buttonTarget;
|
||||
|
@ -61,10 +61,10 @@ private:
|
|||
void setPressed();
|
||||
void setDisabled();
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
MenuTarget(ViewResources& res, Button& button) : View(res, button), m_button(button) {}
|
||||
};
|
||||
ViewChild<std::unique_ptr<MenuTarget>> m_menuTarget;
|
||||
|
@ -80,33 +80,33 @@ public:
|
|||
void destroy() {}
|
||||
};
|
||||
|
||||
~Button() { closeMenu({}); }
|
||||
~Button() override { closeMenu({}); }
|
||||
Button(ViewResources& res, View& parentView, IButtonBinding* controlBinding, std::string_view text,
|
||||
Icon* icon = nullptr, Style style = Style::Block, const zeus::CColor& bgColor = zeus::skWhite,
|
||||
RectangleConstraint constraint = RectangleConstraint());
|
||||
Button(ViewResources& res, View& parentView, IButtonBinding* controlBinding, std::string_view text,
|
||||
const zeus::CColor& textColor, Icon* icon = nullptr, Style style = Style::Block,
|
||||
const zeus::CColor& bgColor = zeus::skWhite, RectangleConstraint constraint = RectangleConstraint());
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void think();
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void think() override;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
void setText(std::string_view text, const zeus::CColor& textColor);
|
||||
void setText(std::string_view text);
|
||||
void setIcon(Icon* icon = nullptr);
|
||||
std::string_view getText() const { return m_textStr; }
|
||||
void colorGlyphs(const zeus::CColor& newColor);
|
||||
int nominalWidth() const { return m_nomWidth; }
|
||||
int nominalHeight() const { return m_nomHeight; }
|
||||
int nominalWidth() const override { return m_nomWidth; }
|
||||
int nominalHeight() const override { return m_nomHeight; }
|
||||
|
||||
void closeMenu(const boo::SWindowCoord& coord);
|
||||
ViewChild<std::unique_ptr<View>>& getMenu() { return m_modalMenu; }
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color) {
|
||||
void setMultiplyColor(const zeus::CColor& color) override {
|
||||
View::setMultiplyColor(color);
|
||||
m_viewVertBlock.m_color = color;
|
||||
if (m_viewVertBlockBuf)
|
||||
|
|
|
@ -15,7 +15,7 @@ struct IControlBinding {
|
|||
};
|
||||
|
||||
struct IButtonBinding : IControlBinding {
|
||||
ControlType type() const { return ControlType::Button; }
|
||||
ControlType type() const override { return ControlType::Button; }
|
||||
static IButtonBinding* castTo(IControlBinding* bind) {
|
||||
return bind->type() == ControlType::Button ? static_cast<IButtonBinding*>(bind) : nullptr;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ struct IButtonBinding : IControlBinding {
|
|||
};
|
||||
|
||||
struct IFloatBinding : IControlBinding {
|
||||
ControlType type() const { return ControlType::Float; }
|
||||
ControlType type() const override { return ControlType::Float; }
|
||||
static IFloatBinding* castTo(IControlBinding* bind) {
|
||||
return bind->type() == ControlType::Float ? static_cast<IFloatBinding*>(bind) : nullptr;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ struct IFloatBinding : IControlBinding {
|
|||
};
|
||||
|
||||
struct IIntBinding : IControlBinding {
|
||||
ControlType type() const { return ControlType::Int; }
|
||||
ControlType type() const override { return ControlType::Int; }
|
||||
static IIntBinding* castTo(IControlBinding* bind) {
|
||||
return bind->type() == ControlType::Int ? static_cast<IIntBinding*>(bind) : nullptr;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ struct IIntBinding : IControlBinding {
|
|||
};
|
||||
|
||||
struct IStringBinding : IControlBinding {
|
||||
ControlType type() const { return ControlType::String; }
|
||||
ControlType type() const override { return ControlType::String; }
|
||||
static IStringBinding* castTo(IControlBinding* bind) {
|
||||
return bind->type() == ControlType::String ? static_cast<IStringBinding*>(bind) : nullptr;
|
||||
}
|
||||
|
@ -76,12 +76,12 @@ struct IStringBinding : IControlBinding {
|
|||
struct CVarControlBinding : IControlBinding {
|
||||
hecl::CVar* m_cvar;
|
||||
CVarControlBinding(hecl::CVar* cvar) : m_cvar(cvar) {}
|
||||
ControlType type() const { return ControlType::CVar; }
|
||||
ControlType type() const override { return ControlType::CVar; }
|
||||
static CVarControlBinding* castTo(IControlBinding* bind) {
|
||||
return bind->type() == ControlType::CVar ? static_cast<CVarControlBinding*>(bind) : nullptr;
|
||||
}
|
||||
std::string_view name(const Control* control) const { return m_cvar->name(); }
|
||||
std::string_view help(const Control* control) const { return m_cvar->rawHelp(); }
|
||||
std::string_view name(const Control* control) const override { return m_cvar->name(); }
|
||||
std::string_view help(const Control* control) const override { return m_cvar->rawHelp(); }
|
||||
};
|
||||
|
||||
class Control : public View {
|
||||
|
|
|
@ -28,16 +28,16 @@ private:
|
|||
friend class FileBrowser;
|
||||
FileBrowser& m_fb;
|
||||
LeftSide(FileBrowser& fb, ViewResources& res) : View(res, fb), m_fb(fb) {}
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
} m_left;
|
||||
|
||||
class RightSide : public View {
|
||||
friend class FileBrowser;
|
||||
FileBrowser& m_fb;
|
||||
RightSide(FileBrowser& fb, ViewResources& res) : View(res, fb), m_fb(fb) {}
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
} m_right;
|
||||
|
||||
ViewChild<std::unique_ptr<SplitView>> m_split;
|
||||
|
@ -52,8 +52,8 @@ private:
|
|||
new Button(res, fb, this, text, nullptr, Button::Style::Block, zeus::skWhite,
|
||||
RectangleConstraint(100 * res.pixelFactor(), -1, RectangleConstraint::Test::Minimum)));
|
||||
}
|
||||
std::string_view name(const Control* control) const { return m_text; }
|
||||
void activated(const Button* button, const boo::SWindowCoord&) { m_fb.okActivated(true); }
|
||||
std::string_view name(const Control* control) const override { return m_text; }
|
||||
void activated(const Button* button, const boo::SWindowCoord&) override { m_fb.okActivated(true); }
|
||||
} m_ok;
|
||||
|
||||
void cancelActivated();
|
||||
|
@ -66,11 +66,11 @@ private:
|
|||
res, fb, this, text, nullptr, Button::Style::Block, zeus::skWhite,
|
||||
RectangleConstraint(m_fb.m_ok.m_button.m_view->nominalWidth(), -1, RectangleConstraint::Test::Minimum)));
|
||||
}
|
||||
std::string_view name(const Control* control) const { return m_text; }
|
||||
void activated(const Button* button, const boo::SWindowCoord&) { m_fb.cancelActivated(); }
|
||||
std::string_view name(const Control* control) const override { return m_text; }
|
||||
void activated(const Button* button, const boo::SWindowCoord&) override { m_fb.cancelActivated(); }
|
||||
} m_cancel;
|
||||
|
||||
void pathButtonActivated(size_t idx);
|
||||
void pathButtonActivated(size_t idx) override;
|
||||
ViewChild<std::unique_ptr<PathButtons>> m_pathButtons;
|
||||
|
||||
ViewChild<std::unique_ptr<TextField>> m_fileField;
|
||||
|
@ -79,8 +79,8 @@ private:
|
|||
std::string m_name;
|
||||
FileFieldBind(FileBrowser& browser, const IViewManager& vm)
|
||||
: m_browser(browser), m_name(vm.translate<locale::file_name>()) {}
|
||||
std::string_view name(const Control* control) const { return m_name; }
|
||||
void changed(const Control* control, std::string_view val) {}
|
||||
std::string_view name(const Control* control) const override { return m_name; }
|
||||
void changed(const Control* control, std::string_view val) override {}
|
||||
} m_fileFieldBind;
|
||||
|
||||
std::unique_ptr<MessageWindow> m_confirmWindow;
|
||||
|
@ -104,10 +104,10 @@ private:
|
|||
std::string m_projStr;
|
||||
std::string m_fileStr;
|
||||
|
||||
size_t columnCount() const { return 3; }
|
||||
size_t rowCount() const { return m_entries.size(); }
|
||||
size_t columnCount() const override { return 3; }
|
||||
size_t rowCount() const override { return m_entries.size(); }
|
||||
|
||||
std::string_view header(size_t cIdx) const {
|
||||
std::string_view header(size_t cIdx) const override {
|
||||
switch (cIdx) {
|
||||
case 0:
|
||||
return m_nameCol;
|
||||
|
@ -121,7 +121,7 @@ private:
|
|||
return {};
|
||||
}
|
||||
|
||||
std::string_view cell(size_t cIdx, size_t rIdx) const {
|
||||
std::string_view cell(size_t cIdx, size_t rIdx) const override {
|
||||
switch (cIdx) {
|
||||
case 0:
|
||||
return m_entries.at(rIdx).m_name;
|
||||
|
@ -137,11 +137,11 @@ private:
|
|||
|
||||
float m_columnSplits[3] = {0.0f, 0.7f, 0.9f};
|
||||
|
||||
bool columnSplitResizeAllowed() const { return true; }
|
||||
bool columnSplitResizeAllowed() const override { return true; }
|
||||
|
||||
float getColumnSplit(size_t cIdx) const { return m_columnSplits[cIdx]; }
|
||||
float getColumnSplit(size_t cIdx) const override { return m_columnSplits[cIdx]; }
|
||||
|
||||
void setColumnSplit(size_t cIdx, float split) { m_columnSplits[cIdx] = split; }
|
||||
void setColumnSplit(size_t cIdx, float split) override { m_columnSplits[cIdx] = split; }
|
||||
|
||||
void updateListing(const hecl::DirectoryEnumerator& dEnum) {
|
||||
m_entries.clear();
|
||||
|
@ -172,12 +172,12 @@ private:
|
|||
SortDirection m_sortDir = SortDirection::Ascending;
|
||||
bool m_needsUpdate = false;
|
||||
|
||||
SortDirection getSort(size_t& cIdx) const {
|
||||
SortDirection getSort(size_t& cIdx) const override {
|
||||
cIdx = m_sizeSort ? 2 : 0;
|
||||
return m_sortDir;
|
||||
}
|
||||
|
||||
void setSort(size_t cIdx, SortDirection dir) {
|
||||
void setSort(size_t cIdx, SortDirection dir) override {
|
||||
if (cIdx == 1)
|
||||
return;
|
||||
m_sizeSort = cIdx == 2;
|
||||
|
@ -185,7 +185,7 @@ private:
|
|||
m_needsUpdate = true;
|
||||
}
|
||||
|
||||
void setSelectedRow(size_t rIdx) {
|
||||
void setSelectedRow(size_t rIdx) override {
|
||||
if (rIdx != SIZE_MAX)
|
||||
m_fb.m_fileField.m_view->setText(m_entries.at(rIdx).m_name);
|
||||
else
|
||||
|
@ -193,7 +193,7 @@ private:
|
|||
m_fb.m_fileField.m_view->clearErrorState();
|
||||
}
|
||||
|
||||
void rowActivated(size_t rIdx) { m_fb.okActivated(false); }
|
||||
void rowActivated(size_t rIdx) override { m_fb.okActivated(false); }
|
||||
|
||||
FileListingDataBind(FileBrowser& fb, const IViewManager& vm) : m_fb(fb) {
|
||||
m_nameCol = vm.translate<locale::name>();
|
||||
|
@ -233,17 +233,17 @@ private:
|
|||
};
|
||||
std::vector<Entry> m_entries;
|
||||
|
||||
size_t columnCount() const { return 1; }
|
||||
size_t rowCount() const { return m_entries.size(); }
|
||||
size_t columnCount() const override { return 1; }
|
||||
size_t rowCount() const override { return m_entries.size(); }
|
||||
|
||||
std::string_view cell(size_t, size_t rIdx) const { return m_entries.at(rIdx).m_name; }
|
||||
std::string_view cell(size_t, size_t rIdx) const override { return m_entries.at(rIdx).m_name; }
|
||||
|
||||
void setSelectedRow(size_t rIdx) {
|
||||
void setSelectedRow(size_t rIdx) override {
|
||||
if (rIdx != SIZE_MAX)
|
||||
m_fb.navigateToPath(m_entries.at(rIdx).m_path);
|
||||
}
|
||||
|
||||
void rowActivated(size_t rIdx) { m_fb.okActivated(true); }
|
||||
void rowActivated(size_t rIdx) override { m_fb.okActivated(true); }
|
||||
};
|
||||
|
||||
BookmarkDataBind m_systemBookmarkBind;
|
||||
|
@ -276,22 +276,22 @@ public:
|
|||
m_showingHidden = showingHidden;
|
||||
navigateToPath(m_path);
|
||||
}
|
||||
void updateContentOpacity(float opacity);
|
||||
void updateContentOpacity(float opacity) override;
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&);
|
||||
void touchDown(const boo::STouchCoord&, uintptr_t);
|
||||
void touchUp(const boo::STouchCoord&, uintptr_t);
|
||||
void touchMove(const boo::STouchCoord&, uintptr_t);
|
||||
void charKeyDown(unsigned long, boo::EModifierKey, bool);
|
||||
void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&) override;
|
||||
void touchDown(const boo::STouchCoord&, uintptr_t) override;
|
||||
void touchUp(const boo::STouchCoord&, uintptr_t) override;
|
||||
void touchMove(const boo::STouchCoord&, uintptr_t) override;
|
||||
void charKeyDown(unsigned long, boo::EModifierKey, bool) override;
|
||||
void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool) override;
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void think();
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void think() override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -57,8 +57,8 @@ class IconView : public View {
|
|||
|
||||
public:
|
||||
IconView(ViewResources& res, View& parentView, Icon& icon);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -34,16 +34,16 @@ class Menu : public View {
|
|||
setHighlightedItem(-1);
|
||||
}
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
int nominalWidth() const { return m_menu.m_cWidth; }
|
||||
int nominalHeight() const { return m_menu.m_cHeight; }
|
||||
int nominalWidth() const override { return m_menu.m_cWidth; }
|
||||
int nominalHeight() const override { return m_menu.m_cHeight; }
|
||||
};
|
||||
std::unique_ptr<ContentView> m_content;
|
||||
ViewChild<std::unique_ptr<ScrollView>> m_scroll;
|
||||
|
@ -55,13 +55,13 @@ class Menu : public View {
|
|||
IMenuNode* m_node;
|
||||
ItemView(ViewResources& res, Menu& menu, std::string_view text, size_t idx, IMenuNode* node);
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
std::vector<ViewChild<std::unique_ptr<ItemView>>> m_items;
|
||||
IMenuNode* m_deferredActivation = nullptr;
|
||||
|
@ -72,15 +72,15 @@ public:
|
|||
Menu(ViewResources& res, View& parentView, IMenuNode* rootNode);
|
||||
void reset(IMenuNode* rootNode);
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&) override;
|
||||
|
||||
void think();
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void think() override;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -20,8 +20,8 @@ private:
|
|||
MessageWindow& m_mw;
|
||||
std::string m_name;
|
||||
OKBinding(MessageWindow& mw, std::string_view name) : m_mw(mw), m_name(name) {}
|
||||
std::string_view name(const Control* control) const { return m_name; }
|
||||
void activated(const Button* button, const boo::SWindowCoord& coord) { m_mw.m_func(true); }
|
||||
std::string_view name(const Control* control) const override { return m_name; }
|
||||
void activated(const Button* button, const boo::SWindowCoord& coord) override { m_mw.m_func(true); }
|
||||
} m_okBind;
|
||||
ViewChild<std::unique_ptr<Button>> m_ok;
|
||||
|
||||
|
@ -29,8 +29,8 @@ private:
|
|||
MessageWindow& m_mw;
|
||||
std::string m_name;
|
||||
CancelBinding(MessageWindow& mw, std::string_view name) : m_mw(mw), m_name(name) {}
|
||||
std::string_view name(const Control* control) const { return m_name; }
|
||||
void activated(const Button* button, const boo::SWindowCoord& coord) { m_mw.m_func(false); }
|
||||
std::string_view name(const Control* control) const override { return m_name; }
|
||||
void activated(const Button* button, const boo::SWindowCoord& coord) override { m_mw.m_func(false); }
|
||||
} m_cancelBind;
|
||||
ViewChild<std::unique_ptr<Button>> m_cancel;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
MessageWindow(ViewResources& res, View& parentView, Type type, std::string_view message,
|
||||
std::function<void(bool ok)> func);
|
||||
|
||||
void updateContentOpacity(float opacity) {
|
||||
void updateContentOpacity(float opacity) override {
|
||||
zeus::CColor color = zeus::CColor::lerp({1, 1, 1, 0}, {1, 1, 1, 1}, opacity);
|
||||
ModalWindow::setMultiplyColor(color);
|
||||
m_text->setMultiplyColor(color);
|
||||
|
@ -46,14 +46,14 @@ public:
|
|||
m_cancel.m_view->setMultiplyColor(color);
|
||||
}
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -55,14 +55,14 @@ protected:
|
|||
public:
|
||||
ModalWindow(ViewResources& res, View& parentView, const RectangleConstraint& constraint, const zeus::CColor& bgColor);
|
||||
ModalWindow(ViewResources& res, View& parentView, const RectangleConstraint& constraint);
|
||||
void think();
|
||||
void think() override;
|
||||
bool skipBuildInAnimation();
|
||||
void close(bool skipAnimation = false);
|
||||
bool closed() const { return m_phase >= Phase::BuildOut; }
|
||||
ModalWindow::Phase phase() const { return m_phase; }
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -31,16 +31,16 @@ public:
|
|||
|
||||
void colorGlyphs(const zeus::CColor& newColor);
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color) {
|
||||
void setMultiplyColor(const zeus::CColor& color) override {
|
||||
for (std::unique_ptr<TextView>& l : m_lines)
|
||||
l->setMultiplyColor(color);
|
||||
}
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
int nominalWidth() const { return m_width; }
|
||||
int nominalHeight() const { return (int(m_lineHeight * m_fontAtlas.FT_LineHeight()) >> 6) * m_lines.size(); }
|
||||
int nominalWidth() const override { return m_width; }
|
||||
int nominalHeight() const override { return (int(m_lineHeight * m_fontAtlas.FT_LineHeight()) >> 6) * m_lines.size(); }
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -34,16 +34,16 @@ public:
|
|||
};
|
||||
|
||||
NumericField(ViewResources& res, View& parentView, std::string_view text);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
void setText(std::string_view text);
|
||||
int nominalWidth() const { return m_nomWidth; }
|
||||
int nominalHeight() const { return m_nomHeight; }
|
||||
int nominalWidth() const override { return m_nomWidth; }
|
||||
int nominalHeight() const override { return m_nomHeight; }
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -24,13 +24,13 @@ class Outliner {
|
|||
};
|
||||
|
||||
Node(ViewResources& res, View& parentView, std::string_view description);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void think();
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
void think() override;
|
||||
};
|
||||
};
|
||||
} // namespace specter
|
||||
|
|
|
@ -14,23 +14,23 @@ class PathButtons : public ScrollView {
|
|||
PathButtons& m_pb;
|
||||
boo::SWindowRect m_scissorRect;
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
|
||||
int nominalWidth() const {
|
||||
int nominalWidth() const override {
|
||||
int ret = 0;
|
||||
for (PathButton& b : m_pb.m_pathButtons)
|
||||
ret += b.m_button.m_view->nominalWidth() + 2;
|
||||
return ret;
|
||||
}
|
||||
int nominalHeight() const {
|
||||
int nominalHeight() const override {
|
||||
return m_pb.m_pathButtons.size() ? m_pb.m_pathButtons[0].m_button.m_view->nominalHeight() : 0;
|
||||
}
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
ContentView(ViewResources& res, PathButtons& pb) : View(res, pb), m_pb(pb) {}
|
||||
};
|
||||
|
@ -46,8 +46,8 @@ class PathButtons : public ScrollView {
|
|||
PathButton(PathButtons& pb, ViewResources& res, size_t idx, const hecl::SystemString& str) : m_pb(pb), m_idx(idx) {
|
||||
m_button.m_view.reset(new Button(res, pb, this, hecl::SystemUTF8Conv(str).str()));
|
||||
}
|
||||
std::string_view name(const Control* control) const { return m_button.m_view->getText(); }
|
||||
void activated(const Button* button, const boo::SWindowCoord&) { m_pb.m_pathButtonPending = m_idx; }
|
||||
std::string_view name(const Control* control) const override { return m_button.m_view->getText(); }
|
||||
void activated(const Button* button, const boo::SWindowCoord&) override { m_pb.m_pathButtonPending = m_idx; }
|
||||
};
|
||||
friend struct PathButton;
|
||||
std::vector<PathButton> m_pathButtons;
|
||||
|
@ -56,10 +56,10 @@ public:
|
|||
PathButtons(ViewResources& res, View& parentView, IPathButtonsBinding& binding, bool fillContainer = false);
|
||||
|
||||
void setButtons(const std::vector<hecl::SystemString>& comps);
|
||||
void setMultiplyColor(const zeus::CColor& color);
|
||||
void setMultiplyColor(const zeus::CColor& color) override;
|
||||
|
||||
/* Fill all available space in container when requested */
|
||||
void containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -65,9 +65,9 @@ class RootView : public View {
|
|||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
|
||||
SplitMenuSystem(RootView& rv, boo::IGraphicsDataFactory::Context& ctx);
|
||||
const std::string* text() const { return &m_text; }
|
||||
size_t subNodeCount() const { return 2; }
|
||||
IMenuNode* subNode(size_t idx) {
|
||||
const std::string* text() const override { return &m_text; }
|
||||
size_t subNodeCount() const override { return 2; }
|
||||
IMenuNode* subNode(size_t idx) override {
|
||||
if (idx)
|
||||
return &m_joinActionNode;
|
||||
else
|
||||
|
@ -82,8 +82,8 @@ class RootView : public View {
|
|||
SplitMenuSystem& m_smn;
|
||||
std::string m_text;
|
||||
SplitActionNode(SplitMenuSystem& smn);
|
||||
const std::string* text() const { return &m_text; }
|
||||
void activated(const boo::SWindowCoord& coord) {
|
||||
const std::string* text() const override { return &m_text; }
|
||||
void activated(const boo::SWindowCoord& coord) override {
|
||||
m_smn.m_deferredSplit = true;
|
||||
m_smn.m_deferredCoord = coord;
|
||||
}
|
||||
|
@ -92,8 +92,8 @@ class RootView : public View {
|
|||
SplitMenuSystem& m_smn;
|
||||
std::string m_text;
|
||||
JoinActionNode(SplitMenuSystem& smn);
|
||||
const std::string* text() const { return &m_text; }
|
||||
void activated(const boo::SWindowCoord& coord) {
|
||||
const std::string* text() const override { return &m_text; }
|
||||
void activated(const boo::SWindowCoord& coord) override {
|
||||
m_smn.m_deferredJoin = true;
|
||||
m_smn.m_deferredCoord = coord;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ class RootView : public View {
|
|||
|
||||
public:
|
||||
RootView(IViewManager& viewMan, ViewResources& res, boo::IWindow* window);
|
||||
~RootView();
|
||||
~RootView() override;
|
||||
|
||||
void destroyed();
|
||||
bool isDestroyed() const { return m_destroyed; }
|
||||
|
@ -112,29 +112,29 @@ public:
|
|||
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
||||
void resized(const boo::SWindowRect& rect, bool) { resized(rect, rect); }
|
||||
#pragma GCC diagnostic pop
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods);
|
||||
void mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods);
|
||||
void mouseMove(const boo::SWindowCoord& coord);
|
||||
void mouseEnter(const boo::SWindowCoord& coord);
|
||||
void mouseLeave(const boo::SWindowCoord& coord);
|
||||
void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& scroll);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods) override;
|
||||
void mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods) override;
|
||||
void mouseMove(const boo::SWindowCoord& coord) override;
|
||||
void mouseEnter(const boo::SWindowCoord& coord) override;
|
||||
void mouseLeave(const boo::SWindowCoord& coord) override;
|
||||
void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& scroll) override;
|
||||
|
||||
void touchDown(const boo::STouchCoord& coord, uintptr_t tid);
|
||||
void touchUp(const boo::STouchCoord& coord, uintptr_t tid);
|
||||
void touchMove(const boo::STouchCoord& coord, uintptr_t tid);
|
||||
void touchDown(const boo::STouchCoord& coord, uintptr_t tid) override;
|
||||
void touchUp(const boo::STouchCoord& coord, uintptr_t tid) override;
|
||||
void touchMove(const boo::STouchCoord& coord, uintptr_t tid) override;
|
||||
|
||||
void charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat);
|
||||
void charKeyUp(unsigned long charCode, boo::EModifierKey mods);
|
||||
void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat);
|
||||
void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods);
|
||||
void modKeyDown(boo::EModifierKey mod, bool isRepeat);
|
||||
void modKeyUp(boo::EModifierKey mod);
|
||||
void charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat) override;
|
||||
void charKeyUp(unsigned long charCode, boo::EModifierKey mods) override;
|
||||
void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat) override;
|
||||
void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods) override;
|
||||
void modKeyDown(boo::EModifierKey mod, bool isRepeat) override;
|
||||
void modKeyUp(boo::EModifierKey mod) override;
|
||||
boo::ITextInputCallback* getTextInputCallback() { return m_activeTextView; }
|
||||
|
||||
void internalThink();
|
||||
void dispatchEvents() { m_events.dispatchEvents(); }
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
const boo::SWindowRect& rootRect() const { return m_rootRect; }
|
||||
|
||||
boo::IWindow* window() const { return m_window; }
|
||||
|
|
|
@ -34,17 +34,19 @@ private:
|
|||
: m_sv(sv)
|
||||
, m_leftName(vm.translate<locale::scroll_left>())
|
||||
, m_rightName(vm.translate<locale::scroll_right>()) {}
|
||||
std::string_view name(const Control* control) const {
|
||||
std::string_view name(const Control* control) const override {
|
||||
return (control == reinterpret_cast<Control*>(m_sv.m_sideButtons[0].m_view.get())) ? m_leftName.c_str()
|
||||
: m_rightName.c_str();
|
||||
}
|
||||
void down(const Button* button, const boo::SWindowCoord& coord) {
|
||||
void down(const Button* button, const boo::SWindowCoord& coord) override {
|
||||
if (button == m_sv.m_sideButtons[0].m_view.get())
|
||||
m_sv.m_sideButtonState = SideButtonState::ScrollRight;
|
||||
else
|
||||
m_sv.m_sideButtonState = SideButtonState::ScrollLeft;
|
||||
}
|
||||
void up(const Button* button, const boo::SWindowCoord& coord) { m_sv.m_sideButtonState = SideButtonState::None; }
|
||||
void up(const Button* button, const boo::SWindowCoord& coord) override {
|
||||
m_sv.m_sideButtonState = SideButtonState::None;
|
||||
}
|
||||
} m_sideButtonBind;
|
||||
ViewChild<std::unique_ptr<Button>> m_sideButtons[2];
|
||||
|
||||
|
@ -58,23 +60,23 @@ public:
|
|||
updateSize();
|
||||
}
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& scroll);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& scroll) override;
|
||||
int getScrollX() const { return m_scroll[0]; }
|
||||
int getScrollY() const { return m_scroll[1]; }
|
||||
|
||||
int nominalWidth() const { return subRect().size[0]; }
|
||||
int nominalHeight() const { return subRect().size[1]; }
|
||||
int nominalWidth() const override { return subRect().size[0]; }
|
||||
int nominalHeight() const override { return subRect().size[1]; }
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color);
|
||||
void setMultiplyColor(const zeus::CColor& color) override;
|
||||
|
||||
void think();
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void think() override;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -34,13 +34,13 @@ class Space : public View {
|
|||
VertexBufferBindingSolid m_vertexBinding;
|
||||
bool m_flip;
|
||||
CornerView(ViewResources& res, Space& space, const zeus::CColor& triColor);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
using View::resized;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, bool flip);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
friend struct CornerView;
|
||||
ViewChild<std::unique_ptr<CornerView>> m_cornerView;
|
||||
|
@ -50,17 +50,17 @@ public:
|
|||
unsigned tbUnits);
|
||||
View* setContentView(View* view);
|
||||
Toolbar* toolbar() { return m_toolbar.m_view.get(); }
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
SplitView* findSplitViewOnSide(SplitView::Axis axis, int side);
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color) {
|
||||
void setMultiplyColor(const zeus::CColor& color) override {
|
||||
View::setMultiplyColor(color);
|
||||
if (m_contentView.m_view)
|
||||
m_contentView.m_view->setMultiplyColor(color);
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
m_toolbar.m_view->setMultiplyColor(color);
|
||||
}
|
||||
|
||||
bool isSpace() const { return true; }
|
||||
bool isSpace() const override { return true; }
|
||||
};
|
||||
inline Space* View::castToSpace() { return isSpace() ? static_cast<Space*>(this) : nullptr; }
|
||||
|
||||
|
|
|
@ -79,15 +79,15 @@ public:
|
|||
void startDragSplit(const boo::SWindowCoord& coord);
|
||||
void endDragSplit();
|
||||
void moveDragSplit(const boo::SWindowCoord& coord);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color) {
|
||||
void setMultiplyColor(const zeus::CColor& color) override {
|
||||
View::setMultiplyColor(color);
|
||||
m_splitBlock.m_color = color;
|
||||
m_splitBlockBuf.access().finalAssign(m_splitBlock);
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
m_views[1].m_view->setMultiplyColor(color);
|
||||
}
|
||||
|
||||
bool isSplitView() const { return true; }
|
||||
bool isSplitView() const override { return true; }
|
||||
};
|
||||
inline SplitView* View::castToSplitView() { return isSplitView() ? static_cast<SplitView*>(this) : nullptr; }
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@ class Table : public View {
|
|||
bool reset(size_t c);
|
||||
bool reset(size_t c, size_t r);
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
std::vector<ViewChild<std::unique_ptr<CellView>>> m_headerViews;
|
||||
using ColumnPool = std::array<std::array<ViewChild<std::unique_ptr<CellView>>, SPECTER_TABLE_MAX_ROWS>, 2>;
|
||||
|
@ -93,14 +93,14 @@ class Table : public View {
|
|||
void _setRowVerts(const boo::SWindowRect& rowsRect, const boo::SWindowRect& scissor);
|
||||
|
||||
RowsView(Table& t, ViewResources& res);
|
||||
int nominalHeight() const;
|
||||
int nominalWidth() const { return m_t.m_scroll.m_view->nominalWidth(); }
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
int nominalHeight() const override;
|
||||
int nominalWidth() const override { return m_t.m_scroll.m_view->nominalWidth(); }
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub, const boo::SWindowRect& scissor) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
} m_rowsView;
|
||||
|
||||
bool m_headerNeedsUpdate = false;
|
||||
|
@ -114,19 +114,19 @@ public:
|
|||
|
||||
void cycleSortColumn(size_t c);
|
||||
void selectRow(size_t r);
|
||||
void setMultiplyColor(const zeus::CColor& color);
|
||||
void setMultiplyColor(const zeus::CColor& color) override;
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&) override;
|
||||
|
||||
void think();
|
||||
void think() override;
|
||||
void updateData();
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -64,37 +64,38 @@ public:
|
|||
std::string_view getText() const { return m_textStr; }
|
||||
void setText(std::string_view str);
|
||||
|
||||
void clipboardCopy();
|
||||
void clipboardCut();
|
||||
void clipboardPaste();
|
||||
void clipboardCopy() override;
|
||||
void clipboardCut() override;
|
||||
void clipboardPaste() override;
|
||||
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord&);
|
||||
void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord&) override;
|
||||
void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool) override;
|
||||
|
||||
bool hasMarkedText() const;
|
||||
std::pair<int, int> markedRange() const;
|
||||
std::pair<int, int> selectedRange() const;
|
||||
bool hasMarkedText() const override;
|
||||
std::pair<int, int> markedRange() const override;
|
||||
std::pair<int, int> selectedRange() const override;
|
||||
void setMarkedText(std::string_view str, const std::pair<int, int>& selectedRange,
|
||||
const std::pair<int, int>& replacementRange);
|
||||
void unmarkText();
|
||||
const std::pair<int, int>& replacementRange) override;
|
||||
void unmarkText() override;
|
||||
|
||||
std::string substringForRange(const std::pair<int, int>& range, std::pair<int, int>& actualRange) const;
|
||||
void insertText(std::string_view str, const std::pair<int, int>& range);
|
||||
int characterIndexAtPoint(const boo::SWindowCoord& point) const;
|
||||
boo::SWindowRect rectForCharacterRange(const std::pair<int, int>& range, std::pair<int, int>& actualRange) const;
|
||||
std::string substringForRange(const std::pair<int, int>& range, std::pair<int, int>& actualRange) const override;
|
||||
void insertText(std::string_view str, const std::pair<int, int>& range) override;
|
||||
int characterIndexAtPoint(const boo::SWindowCoord& point) const override;
|
||||
boo::SWindowRect rectForCharacterRange(const std::pair<int, int>& range,
|
||||
std::pair<int, int>& actualRange) const override;
|
||||
|
||||
void think();
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void think() override;
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
int nominalWidth() const { return m_nomWidth; }
|
||||
int nominalHeight() const { return m_nomHeight; }
|
||||
int nominalWidth() const override { return m_nomWidth; }
|
||||
int nominalHeight() const override { return m_nomHeight; }
|
||||
|
||||
void setActive(bool active);
|
||||
void setActive(bool active) override;
|
||||
void setCursorPos(size_t pos);
|
||||
void setErrorState(std::string_view message);
|
||||
void clearErrorState();
|
||||
|
@ -102,7 +103,7 @@ public:
|
|||
void setSelectionRange(size_t start, size_t count);
|
||||
void clearSelectionRange();
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color) {
|
||||
void setMultiplyColor(const zeus::CColor& color) override {
|
||||
View::setMultiplyColor(color);
|
||||
m_viewVertBlock.m_color = color;
|
||||
if (m_viewVertBlockBuf)
|
||||
|
|
|
@ -95,13 +95,13 @@ public:
|
|||
|
||||
void colorGlyphs(const zeus::CColor& newColor);
|
||||
void colorGlyphsTypeOn(const zeus::CColor& newColor, float startInterval = 0.2, float fadeTime = 0.5);
|
||||
void think();
|
||||
void think() override;
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
int nominalWidth() const { return m_width; }
|
||||
int nominalHeight() const { return m_fontAtlas.FT_LineHeight() >> 6; }
|
||||
int nominalWidth() const override { return m_width; }
|
||||
int nominalHeight() const override { return m_fontAtlas.FT_LineHeight() >> 6; }
|
||||
|
||||
std::pair<int, int> queryGlyphDimensions(size_t pos) const;
|
||||
size_t reverseSelectGlyph(int x) const;
|
||||
|
|
|
@ -35,15 +35,15 @@ private:
|
|||
|
||||
public:
|
||||
Toolbar(ViewResources& res, View& parentView, Position toolbarPos, unsigned units);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
|
||||
void mouseMove(const boo::SWindowCoord&);
|
||||
void mouseEnter(const boo::SWindowCoord&);
|
||||
void mouseLeave(const boo::SWindowCoord& coord);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override;
|
||||
void mouseMove(const boo::SWindowCoord&) override;
|
||||
void mouseEnter(const boo::SWindowCoord&) override;
|
||||
void mouseLeave(const boo::SWindowCoord& coord) override;
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
int nominalHeight() const { return m_nomGauge; }
|
||||
int nominalHeight() const override { return m_nomGauge; }
|
||||
|
||||
void clear() {
|
||||
for (std::vector<ViewChild<View*>>& u : m_children)
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
}
|
||||
void push_back(View* v, unsigned unit);
|
||||
|
||||
void setMultiplyColor(const zeus::CColor& color) {
|
||||
void setMultiplyColor(const zeus::CColor& color) override {
|
||||
View::setMultiplyColor(color);
|
||||
for (std::vector<ViewChild<View*>>& u : m_children)
|
||||
for (ViewChild<View*>& c : u)
|
||||
|
|
|
@ -26,11 +26,11 @@ class Tooltip : public View {
|
|||
|
||||
public:
|
||||
Tooltip(ViewResources& res, View& parentView, std::string_view title, std::string_view message);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub);
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
||||
void resized(const boo::SWindowRect& rootView, const boo::SWindowRect& sub) override;
|
||||
void draw(boo::IGraphicsCommandQueue* gfxQ) override;
|
||||
|
||||
int nominalWidth() const { return m_nomWidth; }
|
||||
int nominalHeight() const { return m_nomHeight; }
|
||||
int nominalWidth() const override { return m_nomWidth; }
|
||||
int nominalHeight() const override { return m_nomHeight; }
|
||||
};
|
||||
|
||||
} // namespace specter
|
||||
|
|
|
@ -99,48 +99,48 @@ class DefaultThemeData : public IThemeData {
|
|||
zeus::CColor m_spaceTriangleShading2 = {0.5725, 0.5725, 0.5725, 1.0};
|
||||
|
||||
public:
|
||||
virtual const zeus::CColor& uiText() const { return m_uiText; }
|
||||
virtual const zeus::CColor& uiAltText() const { return m_uiAltText; }
|
||||
virtual const zeus::CColor& fieldText() const { return m_fieldText; }
|
||||
virtual const zeus::CColor& fieldMarkedText() const { return m_fieldMarkedText; }
|
||||
virtual const zeus::CColor& selectedFieldText() const { return m_selectedFieldText; }
|
||||
const zeus::CColor& uiText() const override { return m_uiText; }
|
||||
const zeus::CColor& uiAltText() const override { return m_uiAltText; }
|
||||
const zeus::CColor& fieldText() const override { return m_fieldText; }
|
||||
const zeus::CColor& fieldMarkedText() const override { return m_fieldMarkedText; }
|
||||
const zeus::CColor& selectedFieldText() const override { return m_selectedFieldText; }
|
||||
|
||||
virtual const zeus::CColor& viewportBackground() const { return m_vpBg; }
|
||||
virtual const zeus::CColor& toolbarBackground() const { return m_tbBg; }
|
||||
virtual const zeus::CColor& tooltipBackground() const { return m_tooltipBg; }
|
||||
virtual const zeus::CColor& spaceBackground() const { return m_spaceBg; }
|
||||
virtual const zeus::CColor& splashBackground() const { return m_splashBg; }
|
||||
virtual const zeus::CColor& splashErrorBackground() const { return m_splashErrorBg; }
|
||||
const zeus::CColor& viewportBackground() const override { return m_vpBg; }
|
||||
const zeus::CColor& toolbarBackground() const override { return m_tbBg; }
|
||||
const zeus::CColor& tooltipBackground() const override { return m_tooltipBg; }
|
||||
const zeus::CColor& spaceBackground() const override { return m_spaceBg; }
|
||||
const zeus::CColor& splashBackground() const override { return m_splashBg; }
|
||||
const zeus::CColor& splashErrorBackground() const override { return m_splashErrorBg; }
|
||||
|
||||
virtual const zeus::CColor& splash1() const { return m_splash1; }
|
||||
virtual const zeus::CColor& splash2() const { return m_splash2; }
|
||||
const zeus::CColor& splash1() const override { return m_splash1; }
|
||||
const zeus::CColor& splash2() const override { return m_splash2; }
|
||||
|
||||
virtual const zeus::CColor& button1Inactive() const { return m_button1Inactive; }
|
||||
virtual const zeus::CColor& button2Inactive() const { return m_button2Inactive; }
|
||||
virtual const zeus::CColor& button1Hover() const { return m_button1Hover; }
|
||||
virtual const zeus::CColor& button2Hover() const { return m_button2Hover; }
|
||||
virtual const zeus::CColor& button1Press() const { return m_button1Press; }
|
||||
virtual const zeus::CColor& button2Press() const { return m_button2Press; }
|
||||
virtual const zeus::CColor& button1Disabled() const { return m_button1Disabled; }
|
||||
virtual const zeus::CColor& button2Disabled() const { return m_button2Disabled; }
|
||||
const zeus::CColor& button1Inactive() const override { return m_button1Inactive; }
|
||||
const zeus::CColor& button2Inactive() const override { return m_button2Inactive; }
|
||||
const zeus::CColor& button1Hover() const override { return m_button1Hover; }
|
||||
const zeus::CColor& button2Hover() const override { return m_button2Hover; }
|
||||
const zeus::CColor& button1Press() const override { return m_button1Press; }
|
||||
const zeus::CColor& button2Press() const override { return m_button2Press; }
|
||||
const zeus::CColor& button1Disabled() const override { return m_button1Disabled; }
|
||||
const zeus::CColor& button2Disabled() const override { return m_button2Disabled; }
|
||||
|
||||
virtual const zeus::CColor& textfield1Inactive() const { return m_textfield1Inactive; }
|
||||
virtual const zeus::CColor& textfield2Inactive() const { return m_textfield2Inactive; }
|
||||
virtual const zeus::CColor& textfield1Hover() const { return m_textfield1Hover; }
|
||||
virtual const zeus::CColor& textfield2Hover() const { return m_textfield2Hover; }
|
||||
virtual const zeus::CColor& textfield1Disabled() const { return m_textfield1Disabled; }
|
||||
virtual const zeus::CColor& textfield2Disabled() const { return m_textfield2Disabled; }
|
||||
virtual const zeus::CColor& textfieldSelection() const { return m_textfieldSelection; }
|
||||
virtual const zeus::CColor& textfieldMarkSelection() const { return m_textfieldMarkSelection; }
|
||||
const zeus::CColor& textfield1Inactive() const override { return m_textfield1Inactive; }
|
||||
const zeus::CColor& textfield2Inactive() const override { return m_textfield2Inactive; }
|
||||
const zeus::CColor& textfield1Hover() const override { return m_textfield1Hover; }
|
||||
const zeus::CColor& textfield2Hover() const override { return m_textfield2Hover; }
|
||||
const zeus::CColor& textfield1Disabled() const override { return m_textfield1Disabled; }
|
||||
const zeus::CColor& textfield2Disabled() const override { return m_textfield2Disabled; }
|
||||
const zeus::CColor& textfieldSelection() const override { return m_textfieldSelection; }
|
||||
const zeus::CColor& textfieldMarkSelection() const override { return m_textfieldMarkSelection; }
|
||||
|
||||
virtual const zeus::CColor& tableCellBg1() const { return m_tableCellBg1; }
|
||||
virtual const zeus::CColor& tableCellBg2() const { return m_tableCellBg2; }
|
||||
virtual const zeus::CColor& tableCellBgSelected() const { return m_tableCellBgSelected; }
|
||||
const zeus::CColor& tableCellBg1() const override { return m_tableCellBg1; }
|
||||
const zeus::CColor& tableCellBg2() const override { return m_tableCellBg2; }
|
||||
const zeus::CColor& tableCellBgSelected() const override { return m_tableCellBgSelected; }
|
||||
|
||||
virtual const zeus::CColor& scrollIndicator() const { return m_scrollIndicator; }
|
||||
const zeus::CColor& scrollIndicator() const override { return m_scrollIndicator; }
|
||||
|
||||
virtual const zeus::CColor& spaceTriangleShading1() const { return m_spaceTriangleShading1; }
|
||||
virtual const zeus::CColor& spaceTriangleShading2() const { return m_spaceTriangleShading2; }
|
||||
const zeus::CColor& spaceTriangleShading1() const override { return m_spaceTriangleShading1; }
|
||||
const zeus::CColor& spaceTriangleShading2() const override { return m_spaceTriangleShading2; }
|
||||
};
|
||||
|
||||
class ViewResources {
|
||||
|
|
Loading…
Reference in New Issue