sys: Improved view const-correctness

This commit is contained in:
WerWolv
2022-01-10 21:05:37 +01:00
parent e1fb0a5d72
commit e35ea13f60
9 changed files with 33 additions and 31 deletions

View File

@@ -14,7 +14,7 @@ namespace hex {
void View::drawMenu() { }
bool View::isAvailable() {
bool View::isAvailable() const {
return ImHexApi::Provider::isValid() && ImHexApi::Provider::get()->isAvailable();
}
@@ -80,15 +80,15 @@ namespace hex {
View::doLater([] { ImGui::OpenPopup("hex.common.fatal"_lang); });
}
bool View::hasViewMenuItemEntry() {
bool View::hasViewMenuItemEntry() const {
return true;
}
ImVec2 View::getMinSize() {
ImVec2 View::getMinSize() const {
return ImVec2(480, 720) * SharedData::globalScale;
}
ImVec2 View::getMaxSize() {
ImVec2 View::getMaxSize() const {
return { FLT_MAX, FLT_MAX };
}
@@ -97,6 +97,10 @@ namespace hex {
return this->m_windowOpen;
}
const bool& View::getWindowOpenState() const {
return this->m_windowOpen;
}
const std::string& View::getUnlocalizedName() const {
return this->m_unlocalizedViewName;
}