Commit bdd7a9c7 authored by twanvl's avatar twanvl

Option to show/hide editing hints (i.e. word list boxes)

parent dd0f3642
...@@ -482,6 +482,7 @@ button: ...@@ -482,6 +482,7 @@ button:
browse: &Browse... browse: &Browse...
high quality: &High quality rendering high quality: &High quality rendering
show lines: Show &lines around fields show lines: Show &lines around fields
show editing hints: Show boxes and hints for &editing
zoom export: Use zoom and rotation settings when e&xporting zoom export: Use zoom and rotation settings when e&xporting
check now: Check &Now check now: Check &Now
always: Always always: Always
......
...@@ -108,6 +108,7 @@ StyleSheetSettings::StyleSheetSettings() ...@@ -108,6 +108,7 @@ StyleSheetSettings::StyleSheetSettings()
, card_angle (0, true) , card_angle (0, true)
, card_anti_alias (true, true) , card_anti_alias (true, true)
, card_borders (true, true) , card_borders (true, true)
, card_draw_editing (true, true)
, card_normal_export(true, true) , card_normal_export(true, true)
{} {}
...@@ -116,6 +117,7 @@ void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) { ...@@ -116,6 +117,7 @@ void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) {
if (card_angle .isDefault()) card_angle .assignDefault(ss.card_angle); if (card_angle .isDefault()) card_angle .assignDefault(ss.card_angle);
if (card_anti_alias .isDefault()) card_anti_alias .assignDefault(ss.card_anti_alias); if (card_anti_alias .isDefault()) card_anti_alias .assignDefault(ss.card_anti_alias);
if (card_borders .isDefault()) card_borders .assignDefault(ss.card_borders); if (card_borders .isDefault()) card_borders .assignDefault(ss.card_borders);
if (card_draw_editing .isDefault()) card_draw_editing .assignDefault(ss.card_draw_editing);
if (card_normal_export.isDefault()) card_normal_export.assignDefault(ss.card_normal_export); if (card_normal_export.isDefault()) card_normal_export.assignDefault(ss.card_normal_export);
} }
...@@ -124,6 +126,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(StyleSheetSettings) { ...@@ -124,6 +126,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(StyleSheetSettings) {
REFLECT(card_angle); REFLECT(card_angle);
REFLECT(card_anti_alias); REFLECT(card_anti_alias);
REFLECT(card_borders); REFLECT(card_borders);
REFLECT(card_draw_editing);
REFLECT(card_normal_export); REFLECT(card_normal_export);
} }
......
...@@ -94,6 +94,7 @@ class StyleSheetSettings : public IntrusivePtrBase<StyleSheetSettings> { ...@@ -94,6 +94,7 @@ class StyleSheetSettings : public IntrusivePtrBase<StyleSheetSettings> {
Defaultable<int> card_angle; Defaultable<int> card_angle;
Defaultable<bool> card_anti_alias; Defaultable<bool> card_anti_alias;
Defaultable<bool> card_borders; Defaultable<bool> card_borders;
Defaultable<bool> card_draw_editing;
Defaultable<bool> card_normal_export; Defaultable<bool> card_normal_export;
/// Where the settings are the default, use the value from ss /// Where the settings are the default, use the value from ss
......
...@@ -42,7 +42,8 @@ bool DataEditor::drawBorders() const { ...@@ -42,7 +42,8 @@ bool DataEditor::drawBorders() const {
settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_borders(); settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_borders();
} }
bool DataEditor::drawEditing() const { bool DataEditor::drawEditing() const {
return true; return nativeLook() ||
settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_draw_editing();
} }
bool DataEditor::drawFocus() const { bool DataEditor::drawFocus() const {
return FindFocus() == this; return FindFocus() == this;
......
...@@ -49,7 +49,7 @@ class DisplayPreferencesPage : public PreferencesPage { ...@@ -49,7 +49,7 @@ class DisplayPreferencesPage : public PreferencesPage {
private: private:
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE();
wxCheckBox* high_quality, *borders; wxCheckBox* high_quality, *borders, *draw_editing;
wxSpinCtrl* zoom; wxSpinCtrl* zoom;
wxCheckBox* non_normal_export; wxCheckBox* non_normal_export;
...@@ -170,12 +170,14 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent) ...@@ -170,12 +170,14 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
// init controls // init controls
high_quality = new wxCheckBox(this, wxID_ANY, _BUTTON_("high quality")); high_quality = new wxCheckBox(this, wxID_ANY, _BUTTON_("high quality"));
borders = new wxCheckBox(this, wxID_ANY, _BUTTON_("show lines")); borders = new wxCheckBox(this, wxID_ANY, _BUTTON_("show lines"));
draw_editing = new wxCheckBox(this, wxID_ANY, _BUTTON_("show editing hints"));
zoom = new wxSpinCtrl(this, wxID_ANY); zoom = new wxSpinCtrl(this, wxID_ANY);
non_normal_export = new wxCheckBox(this, wxID_ANY, _BUTTON_("zoom export")); non_normal_export = new wxCheckBox(this, wxID_ANY, _BUTTON_("zoom export"));
//wxButton* columns = new wxButton(this, ID_SELECT_COLUMNS, _BUTTON_("select")); //wxButton* columns = new wxButton(this, ID_SELECT_COLUMNS, _BUTTON_("select"));
// set values // set values
high_quality-> SetValue( settings.default_stylesheet_settings.card_anti_alias()); high_quality-> SetValue( settings.default_stylesheet_settings.card_anti_alias());
borders-> SetValue( settings.default_stylesheet_settings.card_borders()); borders-> SetValue( settings.default_stylesheet_settings.card_borders());
draw_editing-> SetValue( settings.default_stylesheet_settings.card_draw_editing());
non_normal_export->SetValue(!settings.default_stylesheet_settings.card_normal_export()); non_normal_export->SetValue(!settings.default_stylesheet_settings.card_normal_export());
zoom->SetRange(1, 1000); zoom->SetRange(1, 1000);
zoom-> SetValue(static_cast<int>(settings.default_stylesheet_settings.card_zoom() * 100)); zoom-> SetValue(static_cast<int>(settings.default_stylesheet_settings.card_zoom() * 100));
...@@ -184,6 +186,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent) ...@@ -184,6 +186,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
wxSizer* s2 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("card display")); wxSizer* s2 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("card display"));
s2->Add(high_quality, 0, wxEXPAND | wxALL, 4); s2->Add(high_quality, 0, wxEXPAND | wxALL, 4);
s2->Add(borders, 0, wxEXPAND | wxALL, 4); s2->Add(borders, 0, wxEXPAND | wxALL, 4);
s2->Add(draw_editing, 0, wxEXPAND | wxALL, 4);
wxSizer* s3 = new wxBoxSizer(wxHORIZONTAL); wxSizer* s3 = new wxBoxSizer(wxHORIZONTAL);
s3->Add(new wxStaticText(this, wxID_ANY, _LABEL_("zoom")), 0, wxALL & ~wxLEFT, 4); s3->Add(new wxStaticText(this, wxID_ANY, _LABEL_("zoom")), 0, wxALL & ~wxLEFT, 4);
s3->Add(zoom); s3->Add(zoom);
...@@ -207,6 +210,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent) ...@@ -207,6 +210,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
void DisplayPreferencesPage::store() { void DisplayPreferencesPage::store() {
settings.default_stylesheet_settings.card_anti_alias = high_quality->GetValue(); settings.default_stylesheet_settings.card_anti_alias = high_quality->GetValue();
settings.default_stylesheet_settings.card_borders = borders->GetValue(); settings.default_stylesheet_settings.card_borders = borders->GetValue();
settings.default_stylesheet_settings.card_draw_editing = draw_editing->GetValue();
settings.default_stylesheet_settings.card_zoom = zoom->GetValue() / 100.0; settings.default_stylesheet_settings.card_zoom = zoom->GetValue() / 100.0;
settings.default_stylesheet_settings.card_normal_export = !non_normal_export->GetValue(); settings.default_stylesheet_settings.card_normal_export = !non_normal_export->GetValue();
} }
......
...@@ -1329,10 +1329,12 @@ void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) { ...@@ -1329,10 +1329,12 @@ void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) {
if (!redrawing) { if (!redrawing) {
wl->behind = dc.GetBackground(RealRect(r.right(), r.top() - 1, 10, r.height + 3)); wl->behind = dc.GetBackground(RealRect(r.right(), r.top() - 1, 10, r.height + 3));
} }
if (current || viewer.drawEditing()) {
// draw rectangle around value // draw rectangle around value
dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawRectangle(r.move(-1,-1,2,2)); dc.DrawRectangle(r.move(-1,-1,2,2));
} }
}
// Draw drop down arrows // Draw drop down arrows
FOR_EACH_REVERSE(wl, word_lists) { FOR_EACH_REVERSE(wl, word_lists) {
RealRect& r = wl->rect; RealRect& r = wl->rect;
...@@ -1350,7 +1352,9 @@ void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) { ...@@ -1350,7 +1352,9 @@ void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) {
small = (wl.get() != hovered_words); small = (wl.get() != hovered_words);
} }
if (small) { if (small) {
if (viewer.drawEditing()) {
dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 2, r.height + 2)); dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 2, r.height + 2));
}
} else { } else {
// draw background of drop down button // draw background of drop down button
dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 9, r.height + 2)); dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 9, r.height + 2));
......
# This file contains the keys expected to be in MSE locales # This file contains the keys expected to be in MSE locales
# It was automatically generated by tools/locale/locale.pl # It was automatically generated by tools/locale/locale.pl
# Generated on Thu Sep 20 23:50:25 2007 # Generated on Fri Sep 21 14:19:24 2007
action: action:
add control point: 0 add control point: 0
...@@ -67,6 +67,7 @@ button: ...@@ -67,6 +67,7 @@ button:
select all: 0 select all: 0
select none: 0 select none: 0
show: 0 show: 0
show editing hints: 0
show lines: 0 show lines: 0
symbol gallery: optional, 0 symbol gallery: optional, 0
use auto replace: 0 use auto replace: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment