mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
@@ -233,14 +233,34 @@ namespace hex::ui {
|
||||
m_upperCaseHex = upperCaseHex;
|
||||
}
|
||||
|
||||
bool shouldUpperCaseHex() const {
|
||||
return m_upperCaseHex;
|
||||
}
|
||||
|
||||
void enableGrayOutZeros(bool grayOutZeros) {
|
||||
m_grayOutZero = grayOutZeros;
|
||||
}
|
||||
|
||||
bool shouldGrayOutZeros() const {
|
||||
return m_grayOutZero;
|
||||
}
|
||||
|
||||
void enableShowAscii(bool showAscii) {
|
||||
m_showAscii = showAscii;
|
||||
}
|
||||
|
||||
bool shouldShowAscii() const {
|
||||
return m_showAscii;
|
||||
}
|
||||
|
||||
void enableShowExtendedAscii(bool showExtendedAscii) {
|
||||
m_showExtendedAscii = showExtendedAscii;
|
||||
}
|
||||
|
||||
bool shouldShowExtendedAscii() const {
|
||||
return m_showExtendedAscii;
|
||||
}
|
||||
|
||||
void enableSyncScrolling(bool syncScrolling) {
|
||||
m_scrollPosition.setSynced(syncScrolling);
|
||||
}
|
||||
@@ -253,6 +273,39 @@ namespace hex::ui {
|
||||
m_characterCellPadding = characterCellPadding;
|
||||
}
|
||||
|
||||
void setMiniMapWidth(int miniMapWidth) {
|
||||
m_miniMapWidth = miniMapWidth;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool isMiniMapVisible() const {
|
||||
return m_showMiniMap;
|
||||
}
|
||||
|
||||
int getMiniMapWidth() const {
|
||||
return m_miniMapWidth;
|
||||
}
|
||||
|
||||
std::optional<std::string> getMiniMapVisualizer() const {
|
||||
if (!m_showMiniMap)
|
||||
return std::nullopt;
|
||||
return m_miniMapVisualizer->unlocalizedName;
|
||||
}
|
||||
|
||||
void setMiniMapVisualizer(const UnlocalizedString &miniMapVisualizerName) {
|
||||
if (miniMapVisualizerName.empty()) {
|
||||
m_showMiniMap = false;
|
||||
m_miniMapVisualizer = nullptr;
|
||||
} else {
|
||||
for (const auto &visualizer : ContentRegistry::HexEditor::impl::getMiniMapVisualizers()) {
|
||||
if (visualizer->unlocalizedName == miniMapVisualizerName) {
|
||||
m_miniMapVisualizer = visualizer;
|
||||
m_showMiniMap = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] const std::optional<EncodingFile>& getCustomEncoding() const {
|
||||
return m_currCustomEncoding;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user