From d8759ff51dda47928074cf5848e02ea0f03db801 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sun, 19 Nov 2017 19:47:24 +0100 Subject: [PATCH] Splitting the FString example into sub-functions --- .bettercodehub.yml | 4 +- ChangeLog | 4 + examples/string-operations.cpp | 160 ++++++++++++++++++++++++++- examples/ui.cpp | 56 +++++++--- include/final/fwidget.h | 2 + src/fterm.cpp | 3 +- src/fwidget.cpp | 196 ++++++++++++++++++--------------- 7 files changed, 311 insertions(+), 114 deletions(-) diff --git a/.bettercodehub.yml b/.bettercodehub.yml index d5f3ac2d..f4171ea7 100644 --- a/.bettercodehub.yml +++ b/.bettercodehub.yml @@ -1,6 +1,8 @@ exclude: +- /fonts/newfont.h +- /fonts/vgafont.h - /ltmain.sh -component_depth: 1 +component_depth: 3 languages: - cpp - script diff --git a/ChangeLog b/ChangeLog index 40ca350d..722df601 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-11-19 Markus Gans + * Splitting the FString example into sub-functions to make + the code more comprehensible + 2017-11-18 Markus Gans * Improved command line paramenter handling * New command line paramenter --no-terminal-detection diff --git a/examples/string-operations.cpp b/examples/string-operations.cpp index 65a1165e..39a8ed46 100644 --- a/examples/string-operations.cpp +++ b/examples/string-operations.cpp @@ -31,12 +31,14 @@ #include -int main (int, char**) +void init() { - printf ("----------------[ terminal ]-------------------\n"); + std::cout << "----------------[ terminal ]-------------------" + << std::endl; // init current locale - printf (" Locale: %s\n", std::setlocale(LC_CTYPE, "") ); + std::cout << " Locale: " << std::setlocale(LC_CTYPE, "") + << std::endl; if ( isatty(1) && ! std::strcmp(nl_langinfo(CODESET), "ANSI_X3.4-1968") ) { @@ -44,21 +46,32 @@ int main (int, char**) std::setlocale(LC_ALL, "C"); } - printf (" Codeset: %s\n", nl_langinfo(CODESET)); - + std::cout << " Codeset: " << nl_langinfo(CODESET) << std::endl; std::cout << "--------------[ FString test ]-----------------" << std::endl; +} +//---------------------------------------------------------------------- +void inputStreamExample() +{ // Test: input stream (operator >>) FString in; std::cout << " Input: "; std::cin >> in; std::cout << " instream >> " << in << std::endl; +} +//---------------------------------------------------------------------- +void outputStreamExample() +{ // Test: output stream (operator <<) const FString& out = L"A test string for 0 \x20ac"; std::cout << " outstream << " << out << std::endl; +} +//---------------------------------------------------------------------- +void streamingIntoFStringExample() +{ // Test: Streaming into a FString (operator <<)... // ...from FStrings @@ -120,7 +133,11 @@ int main (int, char**) FString streamer12; streamer12 << float(0.22222222); std::cout << " stream in: " << streamer12 << std::endl; +} +//---------------------------------------------------------------------- +void streamingFromFStringExample() +{ // Test: Streaming from a FString (operator >>)... // ...to FStrings @@ -214,10 +231,19 @@ int main (int, char**) { std::cerr << "Arithmetic error: " << ex.what() << std::endl; } +} +//---------------------------------------------------------------------- +void CStringOutputExample() +{ // Test: c-string output + const FString& out = L"A test string for 0 \x20ac"; printf (" c_str: \"%s\"\n", out.c_str()); +} +//---------------------------------------------------------------------- +void copyIntoFString() +{ // Test: copy a c++ string const FString& cpp_str( std::string("c++ String") ); std::cout << " cpp_str: \"" << cpp_str << "\"" << std::endl; @@ -229,12 +255,20 @@ int main (int, char**) // Test: copy a wide character const FString wch(L'w'); std::cout << " wchar_t: '" << wch << "'" << std::endl; +} +//---------------------------------------------------------------------- +void utf8StringOutputExample() +{ // Test: utf-8 string const FString& len = "длина́"; std::cout << " length: \"" << len << "\" has " << len.getLength() << " characters" << std::endl; +} +//---------------------------------------------------------------------- +void letterCaseExample() +{ // Test: convert uppercase letter to lowercase const FString& lower = FString(L"InPut").toLower(); std::wcout << L" toLower: " << lower << std::endl; @@ -242,7 +276,11 @@ int main (int, char**) // Test: convert lowercase letter to uppercase const FString& upper = FString("inPut").toUpper(); std::cout << " toUpper: " << upper << std::endl; +} +//---------------------------------------------------------------------- +void stringConcatenationExample() +{ // Test: concatenate two FStrings (operator +) const FString& add1 = FString("FString + ") + FString("FString"); std::cout << " add: " << add1 << std::endl; @@ -302,7 +340,11 @@ int main (int, char**) const FString& add13 = std::wstring(L"std::wstring") + FString(" + FString"); std::cout << " add: " << add13 << std::endl; +} +//---------------------------------------------------------------------- +void stringCompareExample() +{ // Test: compare operators ==, <=, <, >=, >, != const FString& cmp = "compare"; @@ -335,7 +377,11 @@ int main (int, char**) std::cout << " cmp: != Ok" << std::endl; else std::cout << " cmp: != Not Ok" << std::endl; +} +//---------------------------------------------------------------------- +void stringSplittingExample() +{ // Test: split a string with a delimiter and returns a vector (array) FString split_str = "a,b,c,d"; std::cout << " split: \"" @@ -348,13 +394,21 @@ int main (int, char**) std::cout << " \"" << (*it) << "\""; std::cout << std::endl; +} +//---------------------------------------------------------------------- +void fromatStringExample() +{ // Test: format a string with sprintf FString formatStr = ""; std::cout << " formatted: " << formatStr.sprintf("sqrt(%d) = %d", 16, 4) << std::endl; +} +//---------------------------------------------------------------------- +void convertToNumberExample() +{ // Test: convert a string to a unsigned long interger try { @@ -404,7 +458,11 @@ int main (int, char**) { std::cerr << "Arithmetic error: " << ex.what() << std::endl; } +} +//---------------------------------------------------------------------- +void convertNumberToStringExample() +{ // Test: convert integer and double value to a string FString num1, num2, num3; num1.setNumber(137); @@ -416,7 +474,11 @@ int main (int, char**) << num2 << " (signed)" << std::endl; std::cout << " setNumber: " << num3 << " (long double)" << std::endl; +} +//---------------------------------------------------------------------- +void formatedNumberExample() +{ // Test: convert and format a integer number with thousand separator std::setlocale (LC_NUMERIC, ""); FString fnum1, fnum2; @@ -433,7 +495,11 @@ int main (int, char**) << fnum1 << " (unsigned)" << std::endl; std::cout << "setFormatedNumber: " << fnum2 << " (signed)" << std::endl; +} +//---------------------------------------------------------------------- +void trimExample() +{ // Test: remove whitespace from the end of a string const FString& trim_str = " A string \t"; std::wcout << " rtrim: \"" @@ -446,9 +512,14 @@ int main (int, char**) // Test: remove whitespace from the beginning and end of a string std::cout << " trim: \"" << trim_str.trim() << "\"" << std::endl; +} +//---------------------------------------------------------------------- +void substringExample() +{ // Test: 11 characters from the left of the string - const FString& alphabet = "a b c d e f g h i j k l m n o p q r s t u v w x y z"; + const FString& alphabet = "a b c d e f g h i j k l m " + "n o p q r s t u v w x y z"; std::cout << " left: \"" << alphabet.left(11) << "\"" << std::endl; @@ -459,7 +530,11 @@ int main (int, char**) // Test: 11 characters from the right of the string std::cout << " right: \"" << alphabet.right(11) << "\"" << std::endl; +} +//---------------------------------------------------------------------- +void insertExample() +{ // Test: insert a string at index position 7 FString insert_str = "I am a string"; @@ -472,7 +547,11 @@ int main (int, char**) { std::cerr << "Out of Range error: " << ex.what() << std::endl; } +} +//---------------------------------------------------------------------- +void indexExample() +{ // Test: get character access at a specified index position FString index(5); // string with five characters index = "index"; @@ -488,7 +567,11 @@ int main (int, char**) { std::cerr << "Out of Range error: " << ex.what() << std::endl; } +} +//---------------------------------------------------------------------- +void iteratorExample() +{ // Test: character access with std::iterator const FString& stringIterator = "iterator"; FString::iterator iter; @@ -504,17 +587,29 @@ int main (int, char**) std::cout << " (front='" << char(stringIterator.front()) << "', back='" << char(stringIterator.back()) << "')" << std::endl; +} +//---------------------------------------------------------------------- +void overwriteExample() +{ // Test: overwrite string at position 10 with "for t" FString overwrite_std = "Overwrite the rest"; std::cout << "overwrite: " << overwrite_std.overwrite("for t", 10) << std::endl; +} +//---------------------------------------------------------------------- +void removeExample() +{ // Test: remove 2 characters at position 7 FString remove_std = "A fast remove"; std::cout << " remove: " << remove_std.remove(7, 2) << std::endl; +} +//---------------------------------------------------------------------- +void substringIncludeExample() +{ // Test: includes a substring (positive test) FString include_std = "string"; @@ -536,25 +631,78 @@ int main (int, char**) std::cout << " includes: \"" << include_std << "\" includes no \"data\" " << std::endl; +} +//---------------------------------------------------------------------- +void replaceExample() +{ // Test: find and replace a substring FString source_str = "computer and software"; const FString& replace_str = source_str.replace("computer", "hard-"); std::cout << " replace: " << replace_str << std::endl; +} +//---------------------------------------------------------------------- +void tabToSpaceExample() +{ // Test: convert tabs to spaces const FString& tab_str = "1234\t5678"; std::cout << " tab: " << tab_str.expandTabs() << std::endl; +} +//---------------------------------------------------------------------- +void backspaceControlCharacterExample() +{ // Test: backspaces remove characters in the string const FString& bs_str = "t\b\bTesT\bt"; std::cout << "backspace: " << bs_str.removeBackspaces() << std::endl; +} +//---------------------------------------------------------------------- +void deleteControlCharacterExample() +{ // Test: delete characters remove characters in the string const FString& del_str = "apple \177\177\177pietree"; std::cout << " delete: " << del_str.removeDel() << std::endl; } + +//---------------------------------------------------------------------- +// main part +//---------------------------------------------------------------------- +int main (int, char**) +{ + init(); + + // Some FString examples + inputStreamExample(); + outputStreamExample(); + streamingIntoFStringExample(); + streamingFromFStringExample(); + CStringOutputExample(); + copyIntoFString(); + utf8StringOutputExample(); + letterCaseExample(); + stringConcatenationExample(); + stringCompareExample(); + stringSplittingExample(); + fromatStringExample(); + convertToNumberExample(); + convertNumberToStringExample(); + formatedNumberExample(); + trimExample(); + substringExample(); + insertExample(); + indexExample(); + iteratorExample(); + overwriteExample(); + removeExample(); + substringIncludeExample(); + replaceExample(); + tabToSpaceExample(); + backspaceControlCharacterExample(); + deleteControlCharacterExample(); +} diff --git a/examples/ui.cpp b/examples/ui.cpp index 986d0249..2c176065 100644 --- a/examples/ui.cpp +++ b/examples/ui.cpp @@ -273,7 +273,9 @@ class MyDialog : public FDialog // Method void initMenu(); + void initMenuCallbacks(); void initStatusBar(); + void initStatusBarCallbacks(); void initWidgets(); void adjustSize(); @@ -298,6 +300,18 @@ class MyDialog : public FDialog void cb_setInput (FWidget*, data_ptr); // Data Members + FMenuItem* Open; + FMenuItem* Quit; + FMenuItem* File1; + FMenuItem* File2; + FMenuItem* File3; + FMenuItem* Cut; + FMenuItem* Copy; + FMenuItem* Paste; + FMenuItem* Clear; + FMenuItem* Env; + FMenuItem* Drive; + FMenuItem* Help; FLineEdit* myLineEdit; FListBox* myList; FString clipboard; @@ -311,9 +325,11 @@ MyDialog::MyDialog (FWidget* parent) , myList() , clipboard() { - initMenu(); // Initialize the program menu - initStatusBar(); // Initialize the status bar - initWidgets(); // Initialize the dialog widgets + initMenu(); // Initialize the program menu + initMenuCallbacks(); // Initialize program menu callbacks + initStatusBar(); // Initialize the status bar + initStatusBarCallbacks(); // Initialize status bar callbacks + initWidgets(); // Initialize the dialog widgets } //---------------------------------------------------------------------- @@ -338,11 +354,11 @@ void MyDialog::initMenu() Options->setDisable(); FDialogListMenu* Window = new FDialogListMenu ("&Window", Menubar); Window->setStatusbarMessage ("List of all the active dialogs"); - FMenuItem* Help = new FMenuItem ("&Help", Menubar); + Help = new FMenuItem ("&Help", Menubar); Help->setStatusbarMessage ("Show version and copyright information"); // "File" menu items - FMenuItem* Open = new FMenuItem ("&Open...", File); + Open = new FMenuItem ("&Open...", File); Open->addAccelerator (fc::Fckey_o); // Ctrl + O Open->setStatusbarMessage ("Locate and open a text file"); FMenu* Recent = new FMenu ("&System files", File); @@ -350,14 +366,14 @@ void MyDialog::initMenu() FMenuItem* Line1 = new FMenuItem (File); Line1->setSeparator(); - FMenuItem* Quit = new FMenuItem ("&Quit", File); + Quit = new FMenuItem ("&Quit", File); Quit->addAccelerator (fc::Fmkey_x); // Meta/Alt + X Quit->setStatusbarMessage ("Exit the program"); // "Recent" menu items - FMenuItem* File1 = new FMenuItem ("/etc/services", Recent); - FMenuItem* File2 = new FMenuItem ("/etc/fstab", Recent); - FMenuItem* File3 = new FMenuItem ("/etc/passwd", Recent); + File1 = new FMenuItem ("/etc/services", Recent); + File2 = new FMenuItem ("/etc/fstab", Recent); + File3 = new FMenuItem ("/etc/passwd", Recent); // "Edit" menu items FMenuItem* Undo = new FMenuItem (fc::Fckey_z, "Undo", Edit); @@ -366,23 +382,28 @@ void MyDialog::initMenu() Redo->setDisable(); FMenuItem* Line2 = new FMenuItem (Edit); Line2->setSeparator(); - FMenuItem* Cut = new FMenuItem (fc::Fckey_x, "Cu&t", Edit); + Cut = new FMenuItem (fc::Fckey_x, "Cu&t", Edit); Cut->setStatusbarMessage ( "Remove the input text" " and put it in the clipboard" ); - FMenuItem* Copy = new FMenuItem (fc::Fckey_c, "&Copy", Edit); + Copy= new FMenuItem (fc::Fckey_c, "&Copy", Edit); Copy->setStatusbarMessage ("Copy the input text into the clipboad"); - FMenuItem* Paste = new FMenuItem (fc::Fckey_v, "&Paste", Edit); + Paste = new FMenuItem (fc::Fckey_v, "&Paste", Edit); Paste->setStatusbarMessage ("Insert text form clipboard"); - FMenuItem* Clear = new FMenuItem (fc::Fkey_dc, "C&lear", Edit); + Clear = new FMenuItem (fc::Fkey_dc, "C&lear", Edit); Clear->setStatusbarMessage ("Delete input text"); // "View" menu items - FMenuItem* Env = new FMenuItem ("&Terminal...", View); + Env = new FMenuItem ("&Terminal...", View); Env->setStatusbarMessage ("Informations about this terminal"); - FMenuItem* Drive = new FMenuItem ("&Drive symbols...", View); + Drive = new FMenuItem ("&Drive symbols...", View); Drive->setStatusbarMessage ("Show drive symbols"); +} +//---------------------------------------------------------------------- +void MyDialog::initMenuCallbacks() +{ // Menu function callbacks + Open->addCallback ( "clicked", @@ -469,8 +490,13 @@ void MyDialog::initStatusBar() FStatusKey* key_F1 = new FStatusKey (fc::Fkey_f1, "About", statusbar); FStatusKey* key_F2 = new FStatusKey (fc::Fkey_f2, "View", statusbar); FStatusKey* key_F3 = new FStatusKey (fc::Fkey_f3, "Quit", statusbar); +} +//---------------------------------------------------------------------- +void MyDialog::initStatusBarCallbacks() +{ // Add some function callbacks + key_F1->addCallback ( "activate", diff --git a/include/final/fwidget.h b/include/final/fwidget.h index 03e8adc8..c21dcf52 100644 --- a/include/final/fwidget.h +++ b/include/final/fwidget.h @@ -474,6 +474,8 @@ class FWidget : public FVTerm, public FObject void processDestroy(); virtual void draw(); static void setColorTheme(); + static void set8ColorTheme(); + static void set16ColorTheme(); // Data Members bool enable; diff --git a/src/fterm.cpp b/src/fterm.cpp index 6c22c2fe..e968eb8d 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -3833,7 +3833,8 @@ void FTerm::init_OptiMove() //---------------------------------------------------------------------- void FTerm::init_OptiAttr() { - // Attribute settings + // Setting video attribute optimization + opti_attr->setNoColorVideo (int(FTermcap::attr_without_color)); opti_attr->set_enter_bold_mode (TCAP(fc::t_enter_bold_mode)); opti_attr->set_exit_bold_mode (TCAP(fc::t_exit_bold_mode)); diff --git a/src/fwidget.cpp b/src/fwidget.cpp index 82f7c2ee..5a30f6e4 100644 --- a/src/fwidget.cpp +++ b/src/fwidget.cpp @@ -2464,6 +2464,111 @@ void FWidget::draw() //---------------------------------------------------------------------- void FWidget::setColorTheme() +{ + if ( getMaxColor() < 16 ) // for 8 color mode + { + set8ColorTheme(); + } + else + { + set16ColorTheme(); + + if ( isKdeTerminal() ) + wc.term_bg = fc::SteelBlue3; + } +} + +//---------------------------------------------------------------------- +void FWidget::set8ColorTheme() +{ + wc.term_fg = fc::Black; + wc.term_bg = fc::Blue; + wc.list_fg = fc::Black; + wc.list_bg = fc::LightGray; + wc.selected_list_fg = fc::Blue; + wc.selected_list_bg = fc::LightGray; + wc.dialog_fg = fc::Black; + wc.dialog_resize_fg = fc::Red; + wc.dialog_emphasis_fg = fc::Blue; + wc.dialog_bg = fc::LightGray; + wc.error_box_fg = fc::Black; + wc.error_box_emphasis_fg = fc::Red; + wc.error_box_bg = fc::LightGray; + wc.tooltip_fg = fc::LightGray; + wc.tooltip_bg = fc::Cyan; + wc.shadow_fg = fc::Black; + wc.shadow_bg = fc::LightGray; // only for transparent shadow + wc.current_element_focus_fg = fc::LightGray; + wc.current_element_focus_bg = fc::Red; + wc.current_element_fg = fc::LightGray; + wc.current_element_bg = fc::Blue; + wc.current_inc_search_element_fg = fc::Brown; + wc.selected_current_element_focus_fg = fc::Blue; + wc.selected_current_element_focus_bg = fc::Red; + wc.selected_current_element_fg = fc::Cyan; + wc.selected_current_element_bg = fc::Blue; + wc.label_fg = fc::Black; + wc.label_bg = fc::LightGray; + wc.label_inactive_fg = fc::Cyan; + wc.label_inactive_bg = fc::LightGray; + wc.label_hotkey_fg = fc::Red; + wc.label_hotkey_bg = fc::LightGray; + wc.label_emphasis_fg = fc::Blue; + wc.label_ellipsis_fg = fc::Black; + wc.inputfield_active_focus_fg = fc::LightGray; + wc.inputfield_active_focus_bg = fc::Blue; + wc.inputfield_active_fg = fc::Black; + wc.inputfield_active_bg = fc::Cyan; + wc.inputfield_inactive_fg = fc::Black; + wc.inputfield_inactive_bg = fc::LightGray; + wc.toggle_button_active_focus_fg = fc::LightGray; + wc.toggle_button_active_focus_bg = fc::Red; + wc.toggle_button_active_fg = fc::Black; + wc.toggle_button_active_bg = fc::LightGray; + wc.toggle_button_inactive_fg = fc::Cyan; + wc.toggle_button_inactive_bg = fc::LightGray; + wc.button_active_focus_fg = fc::LightGray; + wc.button_active_focus_bg = fc::Red; + wc.button_active_fg = fc::LightGray; + wc.button_active_bg = fc::Blue; + wc.button_inactive_fg = fc::Black; + wc.button_inactive_bg = fc::Blue; + wc.button_hotkey_fg = fc::LightGray; + wc.titlebar_active_fg = fc::LightGray; + wc.titlebar_active_bg = fc::Red; + wc.titlebar_inactive_fg = fc::Black; + wc.titlebar_inactive_bg = fc::LightGray; + wc.titlebar_button_fg = fc::Black; + wc.titlebar_button_bg = fc::LightGray; + wc.titlebar_button_focus_fg = fc::LightGray; + wc.titlebar_button_focus_bg = fc::Black; + wc.menu_active_focus_fg = fc::LightGray; + wc.menu_active_focus_bg = fc::Blue; + wc.menu_active_fg = fc::Black; + wc.menu_active_bg = fc::LightGray; + wc.menu_inactive_fg = fc::Cyan; + wc.menu_inactive_bg = fc::LightGray; + wc.menu_hotkey_fg = fc::Red; + wc.menu_hotkey_bg = fc::LightGray; + wc.statusbar_fg = fc::Black; + wc.statusbar_bg = fc::LightGray; + wc.statusbar_hotkey_fg = fc::Red; + wc.statusbar_hotkey_bg = fc::LightGray; + wc.statusbar_separator_fg = fc::Black; + wc.statusbar_active_fg = fc::LightGray; + wc.statusbar_active_bg = fc::Black; + wc.statusbar_active_hotkey_fg = fc::Red; + wc.statusbar_active_hotkey_bg = fc::Black; + wc.scrollbar_fg = fc::Black; + wc.scrollbar_bg = fc::LightGray; + wc.scrollbar_button_fg = fc::Black; + wc.scrollbar_button_bg = fc::LightGray; + wc.progressbar_fg = fc::Blue; + wc.progressbar_bg = fc::LightGray; +} + +//---------------------------------------------------------------------- +void FWidget::set16ColorTheme() { wc.term_fg = fc::Black; wc.term_bg = fc::LightBlue; @@ -2549,95 +2654,4 @@ void FWidget::setColorTheme() wc.scrollbar_button_bg = fc::LightGray; wc.progressbar_fg = fc::DarkGray; wc.progressbar_bg = fc::LightBlue; - - if ( isKdeTerminal() ) - wc.term_bg = fc::SteelBlue3; - - if ( getMaxColor() < 16 ) // for 8 color mode - { - wc.term_fg = fc::Black; - wc.term_bg = fc::Blue; - wc.list_fg = fc::Black; - wc.list_bg = fc::LightGray; - wc.selected_list_fg = fc::Blue; - wc.selected_list_bg = fc::LightGray; - wc.dialog_fg = fc::Black; - wc.dialog_resize_fg = fc::Red; - wc.dialog_emphasis_fg = fc::Blue; - wc.dialog_bg = fc::LightGray; - wc.error_box_fg = fc::Black; - wc.error_box_emphasis_fg = fc::Red; - wc.error_box_bg = fc::LightGray; - wc.tooltip_fg = fc::LightGray; - wc.tooltip_bg = fc::Cyan; - wc.shadow_fg = fc::Black; - wc.shadow_bg = fc::LightGray; // only for transparent shadow - wc.current_element_focus_fg = fc::LightGray; - wc.current_element_focus_bg = fc::Red; - wc.current_element_fg = fc::LightGray; - wc.current_element_bg = fc::Blue; - wc.current_inc_search_element_fg = fc::Brown; - wc.selected_current_element_focus_fg = fc::Blue; - wc.selected_current_element_focus_bg = fc::Red; - wc.selected_current_element_fg = fc::Cyan; - wc.selected_current_element_bg = fc::Blue; - wc.label_fg = fc::Black; - wc.label_bg = fc::LightGray; - wc.label_inactive_fg = fc::Cyan; - wc.label_inactive_bg = fc::LightGray; - wc.label_hotkey_fg = fc::Red; - wc.label_hotkey_bg = fc::LightGray; - wc.label_emphasis_fg = fc::Blue; - wc.label_ellipsis_fg = fc::Black; - wc.inputfield_active_focus_fg = fc::LightGray; - wc.inputfield_active_focus_bg = fc::Blue; - wc.inputfield_active_fg = fc::Black; - wc.inputfield_active_bg = fc::Cyan; - wc.inputfield_inactive_fg = fc::Black; - wc.inputfield_inactive_bg = fc::LightGray; - wc.toggle_button_active_focus_fg = fc::LightGray; - wc.toggle_button_active_focus_bg = fc::Red; - wc.toggle_button_active_fg = fc::Black; - wc.toggle_button_active_bg = fc::LightGray; - wc.toggle_button_inactive_fg = fc::Cyan; - wc.toggle_button_inactive_bg = fc::LightGray; - wc.button_active_focus_fg = fc::LightGray; - wc.button_active_focus_bg = fc::Red; - wc.button_active_fg = fc::LightGray; - wc.button_active_bg = fc::Blue; - wc.button_inactive_fg = fc::Black; - wc.button_inactive_bg = fc::Blue; - wc.button_hotkey_fg = fc::LightGray; - wc.titlebar_active_fg = fc::LightGray; - wc.titlebar_active_bg = fc::Red; - wc.titlebar_inactive_fg = fc::Black; - wc.titlebar_inactive_bg = fc::LightGray; - wc.titlebar_button_fg = fc::Black; - wc.titlebar_button_bg = fc::LightGray; - wc.titlebar_button_focus_fg = fc::LightGray; - wc.titlebar_button_focus_bg = fc::Black; - wc.menu_active_focus_fg = fc::LightGray; - wc.menu_active_focus_bg = fc::Blue; - wc.menu_active_fg = fc::Black; - wc.menu_active_bg = fc::LightGray; - wc.menu_inactive_fg = fc::Cyan; - wc.menu_inactive_bg = fc::LightGray; - wc.menu_hotkey_fg = fc::Red; - wc.menu_hotkey_bg = fc::LightGray; - wc.statusbar_fg = fc::Black; - wc.statusbar_bg = fc::LightGray; - wc.statusbar_hotkey_fg = fc::Red; - wc.statusbar_hotkey_bg = fc::LightGray; - wc.statusbar_separator_fg = fc::Black; - wc.statusbar_active_fg = fc::LightGray; - wc.statusbar_active_bg = fc::Black; - wc.statusbar_active_hotkey_fg = fc::Red; - wc.statusbar_active_hotkey_bg = fc::Black; - wc.scrollbar_fg = fc::Black; - wc.scrollbar_bg = fc::LightGray; - wc.scrollbar_button_fg = fc::Black; - wc.scrollbar_button_bg = fc::LightGray; - wc.progressbar_fg = fc::Blue; - wc.progressbar_bg = fc::LightGray; - } }