diff --git a/ChangeLog b/ChangeLog index 7f025733..986e81d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-10-02 Markus Gans + * SGR and URXVT mouse support for coordinates greater-than + 255 columns or lines + * Add copyright information to the source files + 2017-09-21 Markus Gans * New data type FStringList introduced * Stream and assignment operator support for FLineEdit diff --git a/examples/calculator.cpp b/examples/calculator.cpp index b2edfedb..f9f0e970 100644 --- a/examples/calculator.cpp +++ b/examples/calculator.cpp @@ -1,8 +1,23 @@ -// File: calculator.cpp - -//---------------------------------------------------------------------- -// A simple calculator with trigonometric functions -//---------------------------------------------------------------------- +/************************************************************************ +* calculator.cpp - A simple calculator with trigonometric functions * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -17,6 +32,7 @@ const lDouble PI = 3.141592653589793238L; + //---------------------------------------------------------------------- // class Button //---------------------------------------------------------------------- @@ -96,7 +112,7 @@ class Calc : public FDialog { public: // Constructor - explicit Calc (FWidget* parent=0); + explicit Calc (FWidget* parent = 0); // Destructor ~Calc(); diff --git a/examples/choice.cpp b/examples/choice.cpp index 23c5fab7..4bd4ddf6 100644 --- a/examples/choice.cpp +++ b/examples/choice.cpp @@ -1,4 +1,23 @@ -// File: os-choice.cpp +/************************************************************************ +* os-choice.cpp - FButtonGroup with scroll view * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -119,7 +138,7 @@ int main (int argc, char* argv[]) dgl->show(); // Get the checked radio button text - for (int n=1; n <= int(checkButtonGroup->getCount()); n++) + for (int n = 1; n <= int(checkButtonGroup->getCount()); n++) { if ( checkButtonGroup->isChecked(n) ) { diff --git a/examples/dialog.cpp b/examples/dialog.cpp index f4cddcc0..38d7141c 100644 --- a/examples/dialog.cpp +++ b/examples/dialog.cpp @@ -1,4 +1,23 @@ -// File: dialog.cpp +/************************************************************************ +* dialog.cpp - A FDialog example * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -8,6 +27,7 @@ // function prototype void cb_quit (FWidget*, FWidget::data_ptr); + //---------------------------------------------------------------------- // callback function //---------------------------------------------------------------------- @@ -17,6 +37,7 @@ void cb_quit (FWidget*, FWidget::data_ptr data) app->quit(); } + //---------------------------------------------------------------------- // main part //---------------------------------------------------------------------- diff --git a/examples/hello.cpp b/examples/hello.cpp index 7af7c4c1..1a1d774f 100644 --- a/examples/hello.cpp +++ b/examples/hello.cpp @@ -1,4 +1,23 @@ -// File: hello.cpp +/************************************************************************ +* hello.cpp - A simple hello world program * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/input-dialog.cpp b/examples/input-dialog.cpp index 65d242ff..dacb4efa 100644 --- a/examples/input-dialog.cpp +++ b/examples/input-dialog.cpp @@ -1,4 +1,23 @@ -// File: input-dialog.cpp +/************************************************************************ +* input-dialog.cpp - an input field example * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/keyboard.cpp b/examples/keyboard.cpp index 577fdcd2..8ae0058f 100644 --- a/examples/keyboard.cpp +++ b/examples/keyboard.cpp @@ -1,16 +1,35 @@ -// File: keyboard.cpp +/************************************************************************ +* keyboard.cpp - Shows typed-in key name * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include //---------------------------------------------------------------------- -// class keyboard +// class Keyboard //---------------------------------------------------------------------- -class keyboard : public FWidget +class Keyboard : public FWidget { public: // Constructor - explicit keyboard (FWidget* = 0); + explicit Keyboard (FWidget* = 0); protected: // Event handlers @@ -21,7 +40,7 @@ class keyboard : public FWidget }; //---------------------------------------------------------------------- -keyboard::keyboard (FWidget* parent) +Keyboard::Keyboard (FWidget* parent) : FWidget(parent) { resetXTermForeground(); @@ -31,7 +50,7 @@ keyboard::keyboard (FWidget* parent) } //---------------------------------------------------------------------- -void keyboard::onKeyPress (FKeyEvent* ev) +void Keyboard::onKeyPress (FKeyEvent* ev) { int key_id = ev->key(); bool is_last_line = false; @@ -49,14 +68,14 @@ void keyboard::onKeyPress (FKeyEvent* ev) } //---------------------------------------------------------------------- -void keyboard::onAccel (FAccelEvent* ev) +void Keyboard::onAccel (FAccelEvent* ev) { quit(); ev->accept(); } //---------------------------------------------------------------------- -void keyboard::draw() +void Keyboard::draw() { setPrintPos (1, 1); print() << "---------------\n" @@ -76,7 +95,7 @@ int main (int argc, char* argv[]) app.setBackgroundColor(fc::Default); // Create a keyboard object - keyboard key(&app); + Keyboard key(&app); key.addAccelerator('q'); // Set the keyboard object as main widget diff --git a/examples/listbox.cpp b/examples/listbox.cpp index 5c7d2ede..d31dca5b 100644 --- a/examples/listbox.cpp +++ b/examples/listbox.cpp @@ -1,4 +1,23 @@ -// File: listbox.cpp +/************************************************************************ +* listbox.cpp - Example for using a FListBox widget * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -86,13 +105,13 @@ Listbox::Listbox (FWidget* parent) list1->setGeometry(2, 1, 18, 10); list1->setText ("FListBoxItem"); - for (int i=1; i < 30; i++) + for (int i = 1; i < 30; i++) list1->insert (L"----- " + (FString() << i) + L" -----"); // listbox 2 double_list = new std::list; - for (double i=1; i<=15; i++) + for (double i = 1; i<=15; i++) double_list->push_back(2 * i + (i / 100)); FListBox* list2 = new FListBox (this); diff --git a/examples/listview.cpp b/examples/listview.cpp index e1c597c6..f14ea39f 100644 --- a/examples/listview.cpp +++ b/examples/listview.cpp @@ -1,4 +1,23 @@ -// File: listview.cpp +/************************************************************************ +* listview.cpp - Example for using a multi-column FListView widget * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/mandelbrot.cpp b/examples/mandelbrot.cpp index 0120aa76..6d606995 100644 --- a/examples/mandelbrot.cpp +++ b/examples/mandelbrot.cpp @@ -1,9 +1,29 @@ -// File: mandelbrot.cpp +/************************************************************************ +* mandelbrot.cpp - Shows a ASCII based Mandelbrot set * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include #include + //---------------------------------------------------------------------- // class Mandelbrot //---------------------------------------------------------------------- diff --git a/examples/menu.cpp b/examples/menu.cpp index aaf8b3e0..ae6712de 100644 --- a/examples/menu.cpp +++ b/examples/menu.cpp @@ -1,4 +1,23 @@ -// File: menu.cpp +/************************************************************************ +* menu.cpp - A menu example * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/mouse.cpp b/examples/mouse.cpp index 9fdb3534..99569957 100644 --- a/examples/mouse.cpp +++ b/examples/mouse.cpp @@ -1,4 +1,23 @@ -// File: mouse.cpp +/************************************************************************ +* mouse.cpp - A small mouse-controlled drawing program * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -443,19 +462,17 @@ void MouseDraw::drawBrush (int x, int y, bool swap_color) //---------------------------------------------------------------------- void MouseDraw::drawCanvas() { - int ax, ay, y_end, x_end; - if ( ! hasPrintArea() ) FVTerm::getPrintArea(); if ( ! (hasPrintArea() && canvas) ) return; - ax = 9 + getTermX() - print_area->offset_left; - ay = 1 + getTermY() - print_area->offset_top; - y_end = canvas->height; - x_end = canvas->width; - int w_line_len = print_area->width + print_area->right_shadow; + int ax = 9 + getTermX() - print_area->offset_left + , ay = 1 + getTermY() - print_area->offset_top + , y_end = canvas->height + , x_end = canvas->width + , w_line_len = print_area->width + print_area->right_shadow; for (int y = 0; y < y_end; y++) // line loop { @@ -478,10 +495,10 @@ void MouseDraw::drawCanvas() //---------------------------------------------------------------------- void MouseDraw::adjustSize() { - int w = 60; - int h = 18; - int x = 1 + (getParentWidget()->getWidth() - w) / 2; - int y = 1 + (getParentWidget()->getHeight() - h) / 2; + int w = 60 + , h = 18 + , x = 1 + (getParentWidget()->getWidth() - w) / 2 + , y = 1 + (getParentWidget()->getHeight() - h) / 2; setGeometry (x, y, w, h, false); FDialog::adjustSize(); } diff --git a/examples/opti-move.cpp b/examples/opti-move.cpp index ee05e183..1746ee9b 100644 --- a/examples/opti-move.cpp +++ b/examples/opti-move.cpp @@ -1,4 +1,23 @@ -// File: opti-move.cpp +/************************************************************************ +* opti-move.cpp - Tests the cursor movement optimization * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/scrollview.cpp b/examples/scrollview.cpp index a6aab13f..62136e46 100644 --- a/examples/scrollview.cpp +++ b/examples/scrollview.cpp @@ -1,4 +1,23 @@ -// File: scrollview.cpp +/************************************************************************ +* scrollview.cpp - Shows client widgets in a scroll area * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -7,30 +26,31 @@ #include #include + //---------------------------------------------------------------------- -// class scrollview +// class Scrollview //---------------------------------------------------------------------- #pragma pack(push) #pragma pack(1) -class scrollview : public FScrollView +class Scrollview : public FScrollView { public: // Constructor - explicit scrollview (FWidget* = 0); + explicit Scrollview (FWidget* = 0); // Destructor - ~scrollview (); + ~Scrollview (); // Mutator void setScrollSize (int, int); private: // Disable copy constructor - scrollview (const scrollview&); + Scrollview (const Scrollview&); // Disable assignment operator (=) - scrollview& operator = (const scrollview&); + Scrollview& operator = (const Scrollview&); // Method void draw(); @@ -50,7 +70,7 @@ class scrollview : public FScrollView #pragma pack(pop) //---------------------------------------------------------------------- -scrollview::scrollview (FWidget* parent) +Scrollview::Scrollview (FWidget* parent) : FScrollView(parent) , go_east() , go_south() @@ -74,34 +94,34 @@ scrollview::scrollview (FWidget* parent) go_east->addCallback ( "clicked", - F_METHOD_CALLBACK (this, &scrollview::cb_go_east) + F_METHOD_CALLBACK (this, &Scrollview::cb_go_east) ); go_south->addCallback ( "clicked", - F_METHOD_CALLBACK (this, &scrollview::cb_go_south) + F_METHOD_CALLBACK (this, &Scrollview::cb_go_south) ); go_west->addCallback ( "clicked", - F_METHOD_CALLBACK (this, &scrollview::cb_go_west) + F_METHOD_CALLBACK (this, &Scrollview::cb_go_west) ); go_north->addCallback ( "clicked", - F_METHOD_CALLBACK (this, &scrollview::cb_go_north) + F_METHOD_CALLBACK (this, &Scrollview::cb_go_north) ); } //---------------------------------------------------------------------- -scrollview::~scrollview() +Scrollview::~Scrollview() { } //---------------------------------------------------------------------- -void scrollview::setScrollSize (int width, int height) +void Scrollview::setScrollSize (int width, int height) { FScrollView::setScrollSize (width, height); go_south->setPos (width - 5, 1); @@ -110,7 +130,7 @@ void scrollview::setScrollSize (int width, int height) } //---------------------------------------------------------------------- -void scrollview::draw() +void Scrollview::draw() { if ( isMonochron() ) setReverse(true); @@ -133,7 +153,7 @@ void scrollview::draw() } //---------------------------------------------------------------------- -void scrollview::cb_go_east (FWidget*, data_ptr) +void Scrollview::cb_go_east (FWidget*, data_ptr) { scrollToX (getScrollWidth() - getViewportWidth() + 1); go_south->setFocus(); @@ -142,7 +162,7 @@ void scrollview::cb_go_east (FWidget*, data_ptr) } //---------------------------------------------------------------------- -void scrollview::cb_go_south (FWidget*, data_ptr) +void Scrollview::cb_go_south (FWidget*, data_ptr) { scrollToY (getScrollHeight() - getViewportHeight() + 1); go_west->setFocus(); @@ -151,7 +171,7 @@ void scrollview::cb_go_south (FWidget*, data_ptr) } //---------------------------------------------------------------------- -void scrollview::cb_go_west (FWidget*, data_ptr) +void Scrollview::cb_go_west (FWidget*, data_ptr) { scrollToX (1); go_north->setFocus(); @@ -160,7 +180,7 @@ void scrollview::cb_go_west (FWidget*, data_ptr) } //---------------------------------------------------------------------- -void scrollview::cb_go_north (FWidget*, data_ptr) +void Scrollview::cb_go_north (FWidget*, data_ptr) { scrollToY (1); go_east->setFocus(); @@ -170,20 +190,20 @@ void scrollview::cb_go_north (FWidget*, data_ptr) //---------------------------------------------------------------------- -// class scrollviewdemo +// class Scrollviewdemo //---------------------------------------------------------------------- #pragma pack(push) #pragma pack(1) -class scrollviewdemo : public FDialog +class Scrollviewdemo : public FDialog { public: // Constructor - explicit scrollviewdemo (FWidget* = 0); + explicit Scrollviewdemo (FWidget* = 0); // Destructor - ~scrollviewdemo (); + ~Scrollviewdemo (); // Event handler void onClose (FCloseEvent*); @@ -195,14 +215,14 @@ class scrollviewdemo : public FDialog //---------------------------------------------------------------------- -scrollviewdemo::scrollviewdemo (FWidget* parent) +Scrollviewdemo::Scrollviewdemo (FWidget* parent) : FDialog(parent) { setGeometry (16, 3, 50, 19); setText ("Scrolling viewport example"); // The scrolling viewport widget - scrollview* sview = new scrollview (this); + Scrollview* sview = new Scrollview (this); sview->setGeometry(3, 2, 44, 12); sview->setScrollSize(188, 124); @@ -214,7 +234,7 @@ scrollviewdemo::scrollviewdemo (FWidget* parent) button->addCallback ( "clicked", - F_METHOD_CALLBACK (this, &scrollviewdemo::cb_quit) + F_METHOD_CALLBACK (this, &Scrollviewdemo::cb_quit) ); // Text label @@ -225,17 +245,17 @@ scrollviewdemo::scrollviewdemo (FWidget* parent) } //---------------------------------------------------------------------- -scrollviewdemo::~scrollviewdemo() +Scrollviewdemo::~Scrollviewdemo() { } //---------------------------------------------------------------------- -void scrollviewdemo::cb_quit (FWidget*, data_ptr) +void Scrollviewdemo::cb_quit (FWidget*, data_ptr) { close(); } //---------------------------------------------------------------------- -void scrollviewdemo::onClose (FCloseEvent* ev) +void Scrollviewdemo::onClose (FCloseEvent* ev) { int ret = FMessageBox::info ( this, "Quit" , "Do you really want\n" @@ -259,7 +279,7 @@ int main (int argc, char* argv[]) FApplication app(argc, argv); // Create a simple dialog box - scrollviewdemo svdemo(&app); + Scrollviewdemo svdemo(&app); // Set dialog main_dlg as main widget app.setMainWidget(&svdemo); diff --git a/examples/string-operations.cpp b/examples/string-operations.cpp index 2e95860d..c58773a0 100644 --- a/examples/string-operations.cpp +++ b/examples/string-operations.cpp @@ -1,4 +1,23 @@ -// File: string-operations.cpp +/************************************************************************ +* string-operations.cpp - Demonstrates the functionality of FString * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/term-attributes.cpp b/examples/term-attributes.cpp index 1af88bd9..2cf0a0eb 100644 --- a/examples/term-attributes.cpp +++ b/examples/term-attributes.cpp @@ -1,4 +1,23 @@ -// File: term-attributes.cpp +/************************************************************************ +* term-attributes.cpp - Test the video attributes of the terminal * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/termcap.cpp b/examples/termcap.cpp index 80df8b8a..0b35a455 100644 --- a/examples/termcap.cpp +++ b/examples/termcap.cpp @@ -1,4 +1,23 @@ -// File: termcap.cpp +/************************************************************************ +* termcap.cpp - Show the used termcap variables * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/timer.cpp b/examples/timer.cpp index 85442abc..abf25114 100644 --- a/examples/timer.cpp +++ b/examples/timer.cpp @@ -1,16 +1,36 @@ -// File: timer.cpp +/************************************************************************ +* timer.cpp - Using timer events * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include + //---------------------------------------------------------------------- -// class timer +// class Timer //---------------------------------------------------------------------- -class timer : public FWidget +class Timer : public FWidget { public: // Constructor - explicit timer (FWidget* = 0); + explicit Timer (FWidget* = 0); protected: // Method @@ -22,7 +42,7 @@ class timer : public FWidget }; //---------------------------------------------------------------------- -timer::timer (FWidget* parent) +Timer::Timer (FWidget* parent) : FWidget(parent) { addTimer (60000); // 1-minute timer @@ -38,7 +58,7 @@ timer::timer (FWidget* parent) } //---------------------------------------------------------------------- -void timer::draw() +void Timer::draw() { setPrintPos (1,1); print() << "---------------\n" @@ -48,7 +68,7 @@ void timer::draw() } //---------------------------------------------------------------------- -void timer::onTimer (FTimerEvent* ev) +void Timer::onTimer (FTimerEvent* ev) { bool is_last_line = false; int timer_id = ev->timerId(); @@ -66,7 +86,7 @@ void timer::onTimer (FTimerEvent* ev) } //---------------------------------------------------------------------- -void timer::onAccel (FAccelEvent* ev) +void Timer::onAccel (FAccelEvent* ev) { quit(); ev->accept(); @@ -84,7 +104,7 @@ int main (int argc, char* argv[]) app.setBackgroundColor(fc::Default); // Create a timer object t - timer t(&app); + Timer t(&app); t.addAccelerator('q'); // Set the timer object t as main widget diff --git a/examples/transparent.cpp b/examples/transparent.cpp index 0fede05e..4180f639 100644 --- a/examples/transparent.cpp +++ b/examples/transparent.cpp @@ -1,4 +1,23 @@ -// File: transparent.cpp +/************************************************************************ +* transparent.cpp - Demonstrates transparent windows * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/ui.cpp b/examples/ui.cpp index c213cdfb..b1c13f0f 100644 --- a/examples/ui.cpp +++ b/examples/ui.cpp @@ -1,4 +1,23 @@ -// File: ui.cpp +/************************************************************************ +* ui.cpp - Example of a user interface * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/examples/watch.cpp b/examples/watch.cpp index 639ea215..5b33efd6 100644 --- a/examples/watch.cpp +++ b/examples/watch.cpp @@ -1,4 +1,23 @@ -// File: watch.cpp +/************************************************************************ +* watch.cpp - A watch with FSwitch widgets * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -8,6 +27,7 @@ #include #include + //---------------------------------------------------------------------- // class Watch //---------------------------------------------------------------------- diff --git a/examples/windows.cpp b/examples/windows.cpp index 61ca8646..ebd760e8 100644 --- a/examples/windows.cpp +++ b/examples/windows.cpp @@ -1,4 +1,23 @@ -// File: windows.cpp +/************************************************************************ +* windows.cpp - Shows window handling * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -12,28 +31,29 @@ #include #include + //---------------------------------------------------------------------- -// class smallWindow +// class SmallWindow //---------------------------------------------------------------------- #pragma pack(push) #pragma pack(1) -class smallWindow : public FDialog +class SmallWindow : public FDialog { public: // Constructor - explicit smallWindow (FWidget* = 0); + explicit SmallWindow (FWidget* = 0); // Destructor - ~smallWindow(); + ~SmallWindow(); private: // Disable copy constructor - smallWindow (const smallWindow&); + SmallWindow (const SmallWindow&); // Disable assignment operator (=) - smallWindow& operator = (const smallWindow&); + SmallWindow& operator = (const SmallWindow&); // Method void adjustSize(); @@ -52,7 +72,7 @@ class smallWindow : public FDialog #pragma pack(pop) //---------------------------------------------------------------------- -smallWindow::smallWindow (FWidget* parent) +SmallWindow::SmallWindow (FWidget* parent) : FDialog(parent) , left_arrow() , right_arrow() @@ -101,13 +121,13 @@ smallWindow::smallWindow (FWidget* parent) } //---------------------------------------------------------------------- -smallWindow::~smallWindow() +SmallWindow::~SmallWindow() { delOwnTimer(); } //---------------------------------------------------------------------- -void smallWindow::adjustSize() +void SmallWindow::adjustSize() { if ( isZoomed() ) { @@ -127,13 +147,13 @@ void smallWindow::adjustSize() } //---------------------------------------------------------------------- -void smallWindow::onShow (FShowEvent*) +void SmallWindow::onShow (FShowEvent*) { addTimer(1000); } //---------------------------------------------------------------------- -void smallWindow::onTimer (FTimerEvent*) +void SmallWindow::onTimer (FTimerEvent*) { left_arrow->unsetEmphasis(); left_arrow->redraw(); @@ -355,16 +375,15 @@ void Window::activateWindow (FDialog* win) //---------------------------------------------------------------------- void Window::adjustSize() { - int w, h, X, Y, dx, dy; std::vector::const_iterator iter, first; - w = getRootWidget()->getWidth(); - h = getRootWidget()->getHeight(); - X = int(1 + (w - 40) / 2); - Y = int(1 + (h - 22) / 2); - dx = ( w > 80 ) ? (w - 80) / 2 : 0; - dy = ( h > 24 ) ? (h - 24) / 2 : 0; + int w = getRootWidget()->getWidth() + , h = getRootWidget()->getHeight() + , X = int(1 + (w - 40) / 2) + , Y = int(1 + (h - 22) / 2) + , dx = ( w > 80 ) ? (w - 80) / 2 : 0 + , dy = ( h > 24 ) ? (h - 24) / 2 : 0; - if ( Y < 2) + if ( Y < 2 ) Y = 2; setPos (X, Y); @@ -374,10 +393,9 @@ void Window::adjustSize() { if ( (*iter)->is_open ) { - int x, y, n; - n = int(std::distance(first, iter)); - x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3; - y = dy + 11 + int(n / 3) * 3; + int n = int(std::distance(first, iter)) + , x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3 + , y = dy + 11 + int(n / 3) * 3; (*iter)->dgl->setPos (x, y); } @@ -407,27 +425,25 @@ void Window::onClose (FCloseEvent* ev) //---------------------------------------------------------------------- void Window::cb_createWindows (FWidget*, data_ptr) { - int w, h, dx, dy; std::vector::const_iterator iter, first; iter = first = windows.begin(); - w = getRootWidget()->getWidth(); - h = getRootWidget()->getHeight(); - dx = ( w > 80 ) ? (w - 80) / 2 : 0; - dy = ( h > 24 ) ? (h - 24) / 2 : 0; + int w = getRootWidget()->getWidth() + , h = getRootWidget()->getHeight() + , dx = ( w > 80 ) ? (w - 80) / 2 : 0 + , dy = ( h > 24 ) ? (h - 24) / 2 : 0; while ( iter != windows.end() ) { if ( ! (*iter)->is_open ) { - int x, y, n; win_data* win_dat = *iter; - FDialog* win = new smallWindow(this); + FDialog* win = new SmallWindow(this); win_dat->dgl = win; win_dat->is_open = true; win->setText(*(win_dat)->title); - n = int(std::distance(first, iter)); - x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3; - y = dy + 11 + int(n / 3) * 3; + int n = int(std::distance(first, iter)) + , x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3 + , y = dy + 11 + int(n / 3) * 3; win->setGeometry (x, y, 20, 8); win->setMinimumSize (20, 8); win->setResizeable(); diff --git a/include/final/fapplication.h b/include/final/fapplication.h index d257f23e..76b79dea 100644 --- a/include/final/fapplication.h +++ b/include/final/fapplication.h @@ -1,37 +1,56 @@ -// File: fapplication.h -// Provides: class FApplication -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ -// ▕ FApplication ▏-┬- - - -▕ FEvent ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FPoint ▏ -// : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▏ -// └- - - -▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fapplication.h - Manages the application events * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2013-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ + * ▕ FApplication ▏-┬- - - -▕ FEvent ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FPoint ▏ + * : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▏ + * └- - - -▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FAPPLICATION_H #define FAPPLICATION_H diff --git a/include/final/fbutton.h b/include/final/fbutton.h index 3c4b09dc..c83a8d7f 100644 --- a/include/final/fbutton.h +++ b/include/final/fbutton.h @@ -1,29 +1,48 @@ -// File: fbutton.h -// Provides: class FButton -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FButton ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fbutton.h - Widget FButton * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FButton ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FBUTTON_H #define FBUTTON_H diff --git a/include/final/fbuttongroup.h b/include/final/fbuttongroup.h index 262fb5a6..6bf6f3a2 100644 --- a/include/final/fbuttongroup.h +++ b/include/final/fbuttongroup.h @@ -1,29 +1,49 @@ -// File: fbuttongroup.h -// Provides: class FButtonGroup -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FButtonGroup ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fbuttongroup.h - The FButtonGroup widget organizes FToggleButton * +* widgets in a group. * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FButtonGroup ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FBUTTONGROUP_H #define FBUTTONGROUP_H diff --git a/include/final/fc.h b/include/final/fc.h index f5822aae..8a7accde 100644 --- a/include/final/fc.h +++ b/include/final/fc.h @@ -1,12 +1,31 @@ -// File: fc.h -// Provides: class fc -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ fc ▏ -// ▕▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fc.h - Implements global constants and enumerations * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ fc ▏ + * ▕▁▁▁▁▁▁▁▁▏ + */ #ifndef FC_H #define FC_H @@ -147,15 +166,15 @@ class fc PlusMinus = 0x00b1, // ± Times = 0x00d7, // × Degree = 0x00b0, // ° - BlackVerticalRectangle = 0x25ae, // ▮ + BlackVerticalRectangle = 0x25ae, // ▮ (1) SmallBullet = 0x00b7, // · - BlackDiamond = 0x25c6, // ◆ - SymbolForNewline = 0x2424, // ␤ - SymbolForVerticalTab = 0x240b, // ␋ - SymbolForHorizontalTab = 0x2409, // ␉ - SymbolForFormFeed = 0x240c, // ␌ - SymbolForCarriageReturn = 0x240d, // ␍ - SymbolForLineFeed = 0x240a, // ␊ + BlackDiamondSuit = 0x2666, // ◆ + SymbolForNewline = 0x2424, // ␤ (1) + SymbolForVerticalTab = 0x240b, // ␋ (1) + SymbolForHorizontalTab = 0x2409, // ␉ (1) + SymbolForFormFeed = 0x240c, // ␌ (1) + SymbolForCarriageReturn = 0x240d, // ␍ (1) + SymbolForLineFeed = 0x240a, // ␊ (1) MediumShade = 0x2592, // ▒ BoxDrawingsHorizontal = 0x2500, // ─ BoxDrawingsVertical = 0x2502, // │ @@ -168,12 +187,14 @@ class fc BoxDrawingsVerticalAndLeft = 0x2524, // ┤ BoxDrawingsVerticalAndRight = 0x251c, // ├ BoxDrawingsUpAndHorizontal = 0x2534, // ┴ - HorizontalScanLine1 = 0x23ba, // ⎺ - HorizontalScanLine3 = 0x23bb, // ⎻ - HorizontalScanLine7 = 0x23bc, // ⎼ - HorizontalScanLine9 = 0x23bd, // ⎽ + HorizontalScanLine1 = 0x23ba, // ⎺ (1) + HorizontalScanLine3 = 0x23bb, // ⎻ (1) + HorizontalScanLine7 = 0x23bc, // ⎼ (1) + HorizontalScanLine9 = 0x23bd, // ⎽ (1) BlackUpPointingTriangle = 0x25b2, // ▲ BlackDownPointingTriangle = 0x25bc, // ▼ + BlackRightPointingTriangle = 0x25b6, // ▶ (1) + BlackLeftPointingTriangle = 0x25c0, // ◀ (1) BlackRightPointingPointer = 0x25ba, // ► BlackLeftPointingPointer = 0x25c4, // ◄ Bullet = 0x2022, // • @@ -182,52 +203,56 @@ class fc LowerHalfBlock = 0x2584, // ▄ LeftHalfBlock = 0x258c, // ▌ RightHalfBlock = 0x2590, // ▐ - NF_rev_left_arrow2 = 0x1ab4, // ⊐ - NF_rev_right_arrow2 = 0x1ab5, // ► - NF_radio_button3 = 0x1ab7, // ) - NF_rev_border_corner_upper_right = 0x1ab8, // ⎤ - NF_rev_border_line_right = 0x1ab9, // ⎹ - NF_rev_border_line_vertical_left = 0x1aba, // ┤ - NF_rev_border_corner_lower_right = 0x1abb, // ⎦ - NF_border_line_left = 0x1abc, // ⎸ - NF_rev_up_arrow2 = 0x1abd, //⎹◣ - NF_rev_down_arrow2 = 0x1abe, //⎹◤ - NF_border_corner_middle_lower_left = 0x1ac0, // └ - NF_rev_up_arrow1 = 0x1ac1, // ◢⎸ - NF_rev_down_arrow1 = 0x1ac2, // ◥⎸ - NF_border_line_vertical_right = 0x1ac3, // ├ - NF_border_line_up_and_down = 0x1ac5, // ニ - NF_shadow_box_middle = 0x1ac6, // ニ - NF_shadow_box_hdd = 0x1ac7, // ニ - NF_rev_left_arrow1 = 0x1ac8, // ◄ - NF_rev_right_arrow1 = 0x1ac9, // ⊏ - NF_rev_menu_button1 = 0x1aca, // [ - NF_rev_menu_button2 = 0x1acb, // - - NF_border_corner_middle_upper_left = 0x1acc, // ┌ - NF_shadow_box_cd = 0x1acd, // ニ - NF_shadow_box_left = 0x1ace, // [ - NF_border_corner_middle_lower_right = 0x1acf, // ┘ - NF_border_corner_middle_upper_right = 0x1ad0, // ┐ - NF_shadow_box_net = 0x1ad1, // ニ - NF_rev_up_pointing_triangle1 = 0x1ad2, // ◢ - NF_border_corner_lower_left = 0x1ad3, // ⎣ - NF_border_line_bottom = 0x1ad4, // _ - NF_radio_button2 = 0x1ad5, // ⁐ - NF_radio_button2_checked = 0x1ad6, // ● - NF_rev_down_pointing_triangle1 = 0x1ad7, // ◥ - NF_border_line_upper = 0x1ad8, // ¯ - NF_radio_button1 = 0x1ad9, // ( - NF_border_corner_upper_left = 0x1ada, // ⎡ - NF_shadow_box_checked = 0x1adc, // ✓ - NF_rev_border_line_right_and_left = 0x1ae7, // || - NF_rev_up_pointing_triangle2 = 0x1ae8, // ◣ - NF_rev_down_pointing_triangle2 = 0x1ae9, // ◤ - NF_rev_menu_button3 = 0x1af4, // ] - NF_shadow_box_right = 0x1af5, // ] - NF_Bullet = 0x1af9, // ● - NF_check_mark = 0x1afb, // ✓ + NF_rev_left_arrow2 = 0x1ab4, // ⊐ (2) + NF_rev_right_arrow2 = 0x1ab5, // ► (2) + NF_radio_button3 = 0x1ab7, // ) (2) + NF_rev_border_corner_upper_right = 0x1ab8, // ⎤ (2) + NF_rev_border_line_right = 0x1ab9, // ⎹ (2) + NF_rev_border_line_vertical_left = 0x1aba, // ┤ (2) + NF_rev_border_corner_lower_right = 0x1abb, // ⎦ (2) + NF_border_line_left = 0x1abc, // ⎸ (2) + NF_rev_up_arrow2 = 0x1abd, //⎹◣ (2) + NF_rev_down_arrow2 = 0x1abe, //⎹◤ (2) + NF_border_corner_middle_lower_left = 0x1ac0, // └ (2) + NF_rev_up_arrow1 = 0x1ac1, // ◢⎸ (2) + NF_rev_down_arrow1 = 0x1ac2, // ◥⎸ (2) + NF_border_line_vertical_right = 0x1ac3, // ├ (2) + NF_border_line_up_and_down = 0x1ac5, // ニ (2) + NF_shadow_box_middle = 0x1ac6, // ニ (2) + NF_shadow_box_hdd = 0x1ac7, // ニ (2) + NF_rev_left_arrow1 = 0x1ac8, // ◄ (2) + NF_rev_right_arrow1 = 0x1ac9, // ⊏ (2) + NF_rev_menu_button1 = 0x1aca, // [ (2) + NF_rev_menu_button2 = 0x1acb, // - (2) + NF_border_corner_middle_upper_left = 0x1acc, // ┌ (2) + NF_shadow_box_cd = 0x1acd, // ニ (2) + NF_shadow_box_left = 0x1ace, // [ (2) + NF_border_corner_middle_lower_right = 0x1acf, // ┘ (2) + NF_border_corner_middle_upper_right = 0x1ad0, // ┐ (2) + NF_shadow_box_net = 0x1ad1, // ニ (2) + NF_rev_up_pointing_triangle1 = 0x1ad2, // ◢ (2) + NF_border_corner_lower_left = 0x1ad3, // ⎣ (2) + NF_border_line_bottom = 0x1ad4, // _ (2) + NF_radio_button2 = 0x1ad5, // ⁐ (2) + NF_radio_button2_checked = 0x1ad6, // ● (2) + NF_rev_down_pointing_triangle1 = 0x1ad7, // ◥ (2) + NF_border_line_upper = 0x1ad8, // ¯ (2) + NF_radio_button1 = 0x1ad9, // ( (2) + NF_border_corner_upper_left = 0x1ada, // ⎡ (2) + NF_shadow_box_checked = 0x1adc, // ✓ (2) + NF_rev_border_line_right_and_left = 0x1ae7, // || (2) + NF_rev_up_pointing_triangle2 = 0x1ae8, // ◣ (2) + NF_rev_down_pointing_triangle2 = 0x1ae9, // ◤ (2) + NF_rev_menu_button3 = 0x1af4, // ] (2) + NF_shadow_box_right = 0x1af5, // ] (2) + NF_Bullet = 0x1af9, // ● (2) + NF_check_mark = 0x1afb, // ✓ (2) SquareRoot = 0x221a // √ }; + /* + * (1) Not defined in Windows Glyph List 4 (WGL4) + * (2) Only supported in use with newfont + */ // keyboard - single keys enum keys diff --git a/include/final/fcharmap.h b/include/final/fcharmap.h index 824eac61..1b830168 100644 --- a/include/final/fcharmap.h +++ b/include/final/fcharmap.h @@ -1,4 +1,23 @@ -// File: fcharmap.h +/************************************************************************ +* fcharmap.h - Character mapping and encoding * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #ifndef FCHARMAP_H #define FCHARMAP_H @@ -24,16 +43,16 @@ static uInt character[][fc::NUM_OF_ENCODINGS] = {0x00b0, 'f', 0xb0, 'o'}, // ° - Degree {0x2022, '`', 0x04, '*'}, // • - Bullet {0x00b7, '`', 0xfa, '.'}, // · - small Bullet - {0x25c6, '`', 0x04, '*'}, // ◆ - BlackDiamond - {0x2424, 'h', ' ', ' '}, // ␤ - SymbolForNewline - {0x240b, 'i', ' ', ' '}, // ␋ - SymbolForVerticalTab - {0x2409, 'b', ' ', ' '}, // ␉ - SymbolForHorizontalTab - {0x240c, 'c', ' ', ' '}, // ␌ - SymbolForFormFeed - {0x240d, 'd', ' ', ' '}, // ␍ - SymbolForCarriageReturn - {0x240a, 'e', ' ', ' '}, // ␊ - SymbolForLineFeed + {0x2666, '`', 0x04, '*'}, // ◆ - BlackDiamondSuit + {0x2424, 'h', ' ', ' '}, // ␤ - SymbolForNewline (1) + {0x240b, 'i', ' ', ' '}, // ␋ - SymbolForVerticalTab (1) + {0x2409, 'b', ' ', ' '}, // ␉ - SymbolForHorizontalTab (1) + {0x240c, 'c', ' ', ' '}, // ␌ - SymbolForFormFeed (1) + {0x240d, 'd', ' ', ' '}, // ␍ - SymbolForCarriageReturn (1) + {0x240a, 'e', ' ', ' '}, // ␊ - SymbolForLineFeed (1) {0x2592, 'a', 0xb0, '#'}, // ▒ - MediumShade {0x2588, '0', 0xdb, '#'}, // █ - FullBlock - {0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle + {0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle (1) {0x258c, 0 , 0xdd, ' '}, // ▌ - LeftHalfBlock {0x2590, 0 , 0xde, ' '}, // ▐ - RightHalfBlock {0x2584, 0 , 0xdc, ' '}, // ▄ - LowerHalfBlock @@ -49,61 +68,68 @@ static uInt character[][fc::NUM_OF_ENCODINGS] = {0x2524, 'u', 0xb4, '+'}, // ┤ - BoxDrawingsVerticalAndLeft {0x251c, 't', 0xc3, '+'}, // ├ - BoxDrawingsVerticalAndRight {0x2534, 'v', 0xc1, '+'}, // ┴ - BoxDrawingsUpAndHorizontal - {0x23ba, 'o', '~', '~'}, // ⎺ - HorizontalScanLine1 - {0x23bb, 'p', 0xc4, '-'}, // ⎻ - HorizontalScanLine3 - {0x23bc, 'r', 0xc4, '-'}, // ⎼ - HorizontalScanLine7 - {0x23bd, 's', '_', '_'}, // ⎽ - HorizontalScanLine9 + {0x23ba, 'o', '~', '~'}, // ⎺ - HorizontalScanLine1 (1) + {0x23bb, 'p', 0xc4, '-'}, // ⎻ - HorizontalScanLine3 (1) + {0x23bc, 'r', 0xc4, '-'}, // ⎼ - HorizontalScanLine7 (1) + {0x23bd, 's', '_', '_'}, // ⎽ - HorizontalScanLine9 (1) {0x25b2, '-', 0x1e, '^'}, // ▲ - BlackUpPointingTriangle {0x25bc, '.', 0x1f, 'v'}, // ▼ - BlackDownPointingTriangle - {0x25ba, '+', 0x10, '>'}, // ► - BlackRightPointingPointer + {0x25b6, '+', 0x10, '>'}, // ▶ - BlackRightPointingTriangle + {0x25c0, ',', 0x11, '<'}, // ◀ - BlackLeftPointingTriangle (1) + {0x25ba, '+', 0x10, '>'}, // ► - BlackRightPointingPointer (1) {0x25c4, ',', 0x11, '<'}, // ◄ - BlackLeftPointingPointer - {0x1ab4, 0, 0xb4, 0}, // ⊐ - NF_rev_left_arrow2 - {0x1ab5, 0, 0xb5, 0}, // ► - NF_rev_right_arrow2 - {0x1ab7, 0, 0xb7, 0}, // ) - NF_radio_button3 - {0x1ab8, 0, 0xb8, 0}, // ⎤ - NF_rev_border_corner_upper_right - {0x1ab9, 0, 0xb9, 0}, // ⎹ - NF_rev_border_line_right - {0x1aba, 0, 0xba, 0}, // ┤ - NF_rev_border_line_vertical_left - {0x1abb, 0, 0xbb, 0}, // ⎦ - NF_rev_border_corner_lower_right - {0x1abc, 0, 0xbc, 0}, // ⎸ - NF_border_line_left - {0x1abd, 0, 0xbd, 0}, //⎹◣ - NF_rev_up_arrow2 - {0x1abe, 0, 0xbe, 0}, //⎹◤ - NF_rev_down_arrow2 - {0x1ac0, 0, 0xc0, 0}, // └ - NF_border_corner_middle_lower_left - {0x1ac1, 0, 0xc1, 0}, // ◢⎸ - NF_rev_up_arrow1 - {0x1ac2, 0, 0xc2, 0}, // ◥⎸ - NF_rev_down_arrow1 - {0x1ac3, 0, 0xc3, 0}, // ├ - NF_border_line_vertical_right - {0x1ac5, 0, 0xc5, 0}, // = - NF_border_line_up_and_down - {0x1ac6, 0, 0xc6, 0}, // = - NF_shadow_box_middle - {0x1ac7, 0, 0xc7, 0}, // = - NF_shadow_box_hdd - {0x1ac8, 0, 0xc8, 0}, // ◄ - NF_rev_left_arrow1 - {0x1ac9, 0, 0xc9, 0}, // ⊏ - NF_rev_right_arrow1 - {0x1aca, 0, 0xca, 0}, // [ - NF_rev_menu_button1 - {0x1acb, 0, 0xcb, 0}, // - - NF_rev_menu_button2 - {0x1acc, 0, 0xcc, 0}, // ┌ - NF_border_corner_middle_upper_left - {0x1acd, 0, 0xcd, 0}, // = - NF_shadow_box_cd - {0x1ace, 0, 0xce, 0}, // [ - NF_shadow_box_left - {0x1acf, 0, 0xcf, 0}, // ┘ - NF_border_corner_middle_lower_right - {0x1ad0, 0, 0xd0, 0}, // ┐ - NF_border_corner_middle_upper_right - {0x1ad1, 0, 0xd1, 0}, // = - NF_shadow_box_net - {0x1ad2, 0, 0xd2, 0}, // ◢ - NF_rev_up_pointing_triangle1 - {0x1ad3, 0, 0xd3, 0}, // ⎣ - NF_border_corner_lower_left - {0x1ad4, 0, 0xd4, 0}, // _ - NF_border_line_bottom - {0x1ad5, 0, 0xd5, 0}, // O - NF_radio_button2 - {0x1ad6, 0, 0xd6, 0}, // ● - NF_radio_button2_checked - {0x1ad7, 0, 0xd7, 0}, // ◥ - NF_rev_down_pointing_triangle1 - {0x1ad8, 0, 0xd8, 0}, // ¯ - NF_border_line_upper - {0x1ad9, 0, 0xd9, 0}, // ( - NF_radio_button1 - {0x1ada, 0, 0xda, 0}, // ⎡ - NF_border_corner_upper_left - {0x1adc, 0, 0xdc, 0}, // ✓ - NF_shadow_box_checked - {0x1ae7, 0, 0xe7, 0}, // ║ - NF_rev_border_line_right_and_left - {0x1ae8, 0, 0xe8, 0}, // ◣ - NF_rev_up_pointing_triangle2 - {0x1ae9, 0, 0xe9, 0}, // ◤ - NF_rev_down_pointing_triangle2 - {0x1af4, 0, 0xf4, 0}, // ] - NF_rev_menu_button3 - {0x1af5, 0, 0xf5, 0}, // ] - NF_shadow_box_right - {0x1afb, 0, 0xfb, 0}, // ✓ - NF_check_mark + {0x1ab4, 0, 0xb4, 0}, // ⊐ - NF_rev_left_arrow2 (2) + {0x1ab5, 0, 0xb5, 0}, // ► - NF_rev_right_arrow2 (2) + {0x1ab7, 0, 0xb7, 0}, // ) - NF_radio_button3 (2) + {0x1ab8, 0, 0xb8, 0}, // ⎤ - NF_rev_border_corner_upper_right (2) + {0x1ab9, 0, 0xb9, 0}, // ⎹ - NF_rev_border_line_right (2) + {0x1aba, 0, 0xba, 0}, // ┤ - NF_rev_border_line_vertical_left (2) + {0x1abb, 0, 0xbb, 0}, // ⎦ - NF_rev_border_corner_lower_right (2) + {0x1abc, 0, 0xbc, 0}, // ⎸ - NF_border_line_left (2) + {0x1abd, 0, 0xbd, 0}, //⎹◣ - NF_rev_up_arrow2 (2) + {0x1abe, 0, 0xbe, 0}, //⎹◤ - NF_rev_down_arrow2 (2) + {0x1ac0, 0, 0xc0, 0}, // └ - NF_border_corner_middle_lower_left (2) + {0x1ac1, 0, 0xc1, 0}, // ◢⎸ - NF_rev_up_arrow1 (2) + {0x1ac2, 0, 0xc2, 0}, // ◥⎸ - NF_rev_down_arrow1 (2) + {0x1ac3, 0, 0xc3, 0}, // ├ - NF_border_line_vertical_right (2) + {0x1ac5, 0, 0xc5, 0}, // = - NF_border_line_up_and_down (2) + {0x1ac6, 0, 0xc6, 0}, // = - NF_shadow_box_middle (2) + {0x1ac7, 0, 0xc7, 0}, // = - NF_shadow_box_hdd (2) + {0x1ac8, 0, 0xc8, 0}, // ◄ - NF_rev_left_arrow1 (2) + {0x1ac9, 0, 0xc9, 0}, // ⊏ - NF_rev_right_arrow1 (2) + {0x1aca, 0, 0xca, 0}, // [ - NF_rev_menu_button1 (2) + {0x1acb, 0, 0xcb, 0}, // - - NF_rev_menu_button2 (2) + {0x1acc, 0, 0xcc, 0}, // ┌ - NF_border_corner_middle_upper_left (2) + {0x1acd, 0, 0xcd, 0}, // = - NF_shadow_box_cd (2) + {0x1ace, 0, 0xce, 0}, // [ - NF_shadow_box_left (2) + {0x1acf, 0, 0xcf, 0}, // ┘ - NF_border_corner_middle_lower_right (2) + {0x1ad0, 0, 0xd0, 0}, // ┐ - NF_border_corner_middle_upper_right (2) + {0x1ad1, 0, 0xd1, 0}, // = - NF_shadow_box_net (2) + {0x1ad2, 0, 0xd2, 0}, // ◢ - NF_rev_up_pointing_triangle1 (2) + {0x1ad3, 0, 0xd3, 0}, // ⎣ - NF_border_corner_lower_left (2) + {0x1ad4, 0, 0xd4, 0}, // _ - NF_border_line_bottom (2) + {0x1ad5, 0, 0xd5, 0}, // O - NF_radio_button2 (2) + {0x1ad6, 0, 0xd6, 0}, // ● - NF_radio_button2_checked (2) + {0x1ad7, 0, 0xd7, 0}, // ◥ - NF_rev_down_pointing_triangle1 (2) + {0x1ad8, 0, 0xd8, 0}, // ¯ - NF_border_line_upper (2) + {0x1ad9, 0, 0xd9, 0}, // ( - NF_radio_button1 (2) + {0x1ada, 0, 0xda, 0}, // ⎡ - NF_border_corner_upper_left (2) + {0x1adc, 0, 0xdc, 0}, // ✓ - NF_shadow_box_checked (2) + {0x1ae7, 0, 0xe7, 0}, // ║ - NF_rev_border_line_right_and_left (2) + {0x1ae8, 0, 0xe8, 0}, // ◣ - NF_rev_up_pointing_triangle2 (2) + {0x1ae9, 0, 0xe9, 0}, // ◤ - NF_rev_down_pointing_triangle2 (2) + {0x1af4, 0, 0xf4, 0}, // ] - NF_rev_menu_button3 (2) + {0x1af5, 0, 0xf5, 0}, // ] - NF_shadow_box_right (2) + {0x1afb, 0, 0xfb, 0}, // ✓ - NF_check_mark (2) {0x221a, 0, 0xfb, 'x'}, // √ - square root {0x25cf, '`', 0x04, '*'} // ● - black circle }; +/* + * (1) Not defined in Windows Glyph List 4 (WGL4) + * (2) Only supported in use with newfont + */ + const int lastCharItem = int(sizeof(character) / sizeof(character[0])) - 1; @@ -116,7 +142,7 @@ static int vt100_key_to_utf8[][2] = {fc::vt100_key_block , fc::FullBlock}, // █ {fc::vt100_key_nsup , fc::SuperscriptLatinSmallLetterN}, // ⁿ {fc::vt100_key_blackrect, fc::BlackVerticalRectangle}, // ▮ - {fc::vt100_key_diamond , fc::BlackDiamond}, // ◆ + {fc::vt100_key_diamond , fc::BlackDiamondSuit}, // ◆ {fc::vt100_key_ckboard , fc::MediumShade}, // ▒ {fc::vt100_key_htab , fc::SymbolForHorizontalTab}, // ␉ {fc::vt100_key_ff , fc::SymbolForFormFeed}, // ␌ diff --git a/include/final/fcheckbox.h b/include/final/fcheckbox.h index 9f25222b..0becc715 100644 --- a/include/final/fcheckbox.h +++ b/include/final/fcheckbox.h @@ -1,34 +1,53 @@ -// File: fcheckbox.h -// Provides: class FCheckBox -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FToggleButton ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FCheckBox ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fcheckbox.h - Widget FCheckBox * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FToggleButton ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FCheckBox ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FCHECKBOX_H #define FCHECKBOX_H diff --git a/include/final/fcheckmenuitem.h b/include/final/fcheckmenuitem.h index a78c1a4f..4c7428c3 100644 --- a/include/final/fcheckmenuitem.h +++ b/include/final/fcheckmenuitem.h @@ -1,34 +1,53 @@ -// File: fcheckmenuitem.h -// Provides: class FCheckMenuItem -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ -// ▕ FCheckMenuItem ▏- - - - -▕ FMenu ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏ +/************************************************************************ +* fcheckmenuitem.h - Widget FCheckMenuItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ + * ▕ FCheckMenuItem ▏- - - - -▕ FMenu ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏ + */ #ifndef FCHECKMENUITEM_H #define FCHECKMENUITEM_H diff --git a/include/final/fdialog.h b/include/final/fdialog.h index 4d93b6d8..d634d730 100644 --- a/include/final/fdialog.h +++ b/include/final/fdialog.h @@ -1,34 +1,53 @@ -// File: fdialog.h -// Provides: class FDialog -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FDialog ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fdialog.h - Widget FDialog * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FDialog ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FDIALOG_H #define FDIALOG_H diff --git a/include/final/fdialoglistmenu.h b/include/final/fdialoglistmenu.h index 02560b83..cdc7c10b 100644 --- a/include/final/fdialoglistmenu.h +++ b/include/final/fdialoglistmenu.h @@ -1,41 +1,60 @@ -// File: fdialoglistmenu.h -// Provides: class FDialogListMenu -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ ▕ FMenuList ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▏ -// ▕ FMenu ▏ -// ▕▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FDialogListMenu ▏- - - - - -▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏1 1▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fdialoglistmenu.h - Widget FDialogListMenu * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ ▕ FMenuList ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▏ + * ▕ FMenu ▏ + * ▕▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FDialogListMenu ▏- - - - - -▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏1 1▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FDIALOGLISTMENU_H #define FDIALOGLISTMENU_H diff --git a/include/final/fevent.h b/include/final/fevent.h index c50f688e..d4f3531d 100644 --- a/include/final/fevent.h +++ b/include/final/fevent.h @@ -1,54 +1,72 @@ -// File: fevent.h -// Provides: class FEvent -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FEvent ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FKeyEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FMouseEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FWheelEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FFocusEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FAccelEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FResizeEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FShowEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FHideEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├─────▏FCloseEvent ▏ -// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ -// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// └─────▏FTimerEvent ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fevent.h - Base event class of widgets * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FEvent ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FKeyEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FMouseEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FWheelEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FFocusEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FAccelEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FResizeEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FShowEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FHideEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├─────▏FCloseEvent ▏ + * │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ + * │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * └─────▏FTimerEvent ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FEVENT_H #define FEVENT_H diff --git a/include/final/ffiledialog.h b/include/final/ffiledialog.h index 19a19e57..819fa884 100644 --- a/include/final/ffiledialog.h +++ b/include/final/ffiledialog.h @@ -1,39 +1,58 @@ -// File: ffiledialog.h -// Provides: class FFileDialog -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FDialog ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FFileDialog ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* ffiledialog.h - Widget FFileDialog (a file chooser dialog) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FDialog ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FFileDialog ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FFILEDIALOG_H #define FFILEDIALOG_H diff --git a/include/final/final.h b/include/final/final.h index 62ea44f1..ccd82455 100644 --- a/include/final/final.h +++ b/include/final/final.h @@ -1,4 +1,24 @@ -// final.h +/************************************************************************ +* final.h - Include all in the Final Cut required functions, types * +* and macros * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #ifndef FINAL_H #define FINAL_H diff --git a/include/final/fkey_map.h b/include/final/fkey_map.h index ce0d98a0..ab29790a 100644 --- a/include/final/fkey_map.h +++ b/include/final/fkey_map.h @@ -1,4 +1,23 @@ -// File: fkey_map.h +/************************************************************************ +* fkey_map.h - Key name mapping * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #ifndef FKEYMAP_H #define FKEYMAP_H diff --git a/include/final/flabel.h b/include/final/flabel.h index 83b15ff8..cc4c721c 100644 --- a/include/final/flabel.h +++ b/include/final/flabel.h @@ -1,29 +1,48 @@ -// File: flabel.h -// Provides: class FLabel -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FLabel ▏ -// ▕▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* flabel.cpp - Widget FLabel * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FLabel ▏ + * ▕▁▁▁▁▁▁▁▁▏ + */ #ifndef FLABEL_H #define FLABEL_H diff --git a/include/final/flineedit.h b/include/final/flineedit.h index 7317b09c..a63338ad 100644 --- a/include/final/flineedit.h +++ b/include/final/flineedit.h @@ -1,29 +1,48 @@ -// File: flineedit.h -// Provides: class FLineEdit -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FLineEdit ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* flineedit.h - Widget FLineEdit * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FLineEdit ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FLINEEDIT_H #define FLINEEDIT_H diff --git a/include/final/flistbox.h b/include/final/flistbox.h index 94964610..57b9645a 100644 --- a/include/final/flistbox.h +++ b/include/final/flistbox.h @@ -1,31 +1,49 @@ -// File: flistbox.h -// Provides: class FListBoxItem -// class FListBox -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FListBox ▏- - - -▕ FListBoxItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// +/************************************************************************ +* flistbox.h - Widget FListBox and FListBoxItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FListBox ▏- - - -▕ FListBoxItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * + */ #ifndef FLISTBOX_H #define FLISTBOX_H diff --git a/include/final/fmenu.h b/include/final/fmenu.h index 660d4be8..95d54369 100644 --- a/include/final/fmenu.h +++ b/include/final/fmenu.h @@ -1,36 +1,55 @@ -// File: fmenubar.h -// Provides: class FMenu -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▲ ┌ - -▕ FRadioMenuItem ▏ -// │ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// ▕▔▔▔▔▔▔▔▔▔▏ : -// ▕ FWidget ▏ : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ├ - -▕ FCheckMenuItem ▏ -// ▲ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// │ 1 : -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏- ┘ ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ ▕ FMenuList ▏- - - -▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏1 *▕▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ 1: -// │ │ : -// └─────┬─────┘ : -// │ 1 : -// ▕▔▔▔▔▔▔▔▏- - - ┘ ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FMenu ▏- - - - - - - -▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▏1 1▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fmenu.h - Widget FMenu * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▲ ┌ - -▕ FRadioMenuItem ▏ + * │ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * ▕▔▔▔▔▔▔▔▔▔▏ : + * ▕ FWidget ▏ : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ├ - -▕ FCheckMenuItem ▏ + * ▲ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * │ 1 : + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏- ┘ ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ ▕ FMenuList ▏- - - -▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏1 *▕▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ 1: + * │ │ : + * └─────┬─────┘ : + * │ 1 : + * ▕▔▔▔▔▔▔▔▏- - - ┘ ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FMenu ▏- - - - - - - -▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▏1 1▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FMENU_H #define FMENU_H diff --git a/include/final/fmenubar.h b/include/final/fmenubar.h index 3ead180d..fa859d3d 100644 --- a/include/final/fmenubar.h +++ b/include/final/fmenubar.h @@ -1,36 +1,55 @@ -// File: fmenubar.h -// Provides: class FMenuBar -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ ▕ FMenuList ▏- - - -▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FMenuBar ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fmenubar.h - Widget FMenuBar * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ ▕ FMenuList ▏- - - -▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FMenuBar ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FMENUBAR_H #define FMENUBAR_H diff --git a/include/final/fmenuitem.h b/include/final/fmenuitem.h index d42c13d9..cce0fb2e 100644 --- a/include/final/fmenuitem.h +++ b/include/final/fmenuitem.h @@ -1,33 +1,52 @@ -// File: fmenuitem.h -// Provides: class FMenuItem -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ -// ▕ FMenuItem ▏-┬- - - -▕ FMenu ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▏ -// : -// : 1▕▔▔▔▔▔▔▔▔▔▔▔▏ -// └- - - -▕ FMenuList ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fmenuitem.h - Widget FMenuItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ + * ▕ FMenuItem ▏-┬- - - -▕ FMenu ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▏ + * : + * : 1▕▔▔▔▔▔▔▔▔▔▔▔▏ + * └- - - -▕ FMenuList ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FMENUITEM_H #define FMENUITEM_H diff --git a/include/final/fmenulist.h b/include/final/fmenulist.h index 8e108f57..5cf9792a 100644 --- a/include/final/fmenulist.h +++ b/include/final/fmenulist.h @@ -1,20 +1,39 @@ -// File: fmenulist.h -// Provides: class FMenuList -// -// Base class -// ══════════ -// -// ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FMenuList ▏- - - -▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// :1 -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ├- - - - - - -▕ FRadioMenuItem ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// └- - - - - - -▕ FCheckMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fmenulist.h - Menu item container base class * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Base class + * ══════════ + * + * ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FMenuList ▏- - - -▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * :1 + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ├- - - - - - -▕ FRadioMenuItem ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * └- - - - - - -▕ FCheckMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FMENULIST_H #define FMENULIST_H diff --git a/include/final/fmessagebox.h b/include/final/fmessagebox.h index 9de96316..78e53142 100644 --- a/include/final/fmessagebox.h +++ b/include/final/fmessagebox.h @@ -1,39 +1,58 @@ -// File: fmessagebox.h -// Provides: class FMessageBox -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FDialog ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FMessageBox ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fmessagebox.h - Widget FMessageBox (a text message window) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FDialog ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FMessageBox ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FMESSAGEBOX_H #define FMESSAGEBOX_H diff --git a/include/final/fobject.h b/include/final/fobject.h index 989d5c70..de94e69b 100644 --- a/include/final/fobject.h +++ b/include/final/fobject.h @@ -1,12 +1,31 @@ -// File: fobject.h -// Provides: class FObject -// -// Base class -// ══════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fobject.h - Object container base class of all widget objects * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Base class + * ══════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FOBJECT_H #define FOBJECT_H diff --git a/include/final/foptiattr.h b/include/final/foptiattr.h index 1bfbc409..cd58143f 100644 --- a/include/final/foptiattr.h +++ b/include/final/foptiattr.h @@ -1,12 +1,31 @@ -// File: foptiattr.h -// Provides: class FOptiAttr -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FOptiAttr ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* foptiattr.h - Sets video attributes in optimized order * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FOptiAttr ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FOPTIATTR_H #define FOPTIATTR_H diff --git a/include/final/foptimove.h b/include/final/foptimove.h index 823b4467..19ae4914 100644 --- a/include/final/foptimove.h +++ b/include/final/foptimove.h @@ -1,12 +1,31 @@ -// File: foptimove.h -// Provides: class FOptiMove -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FOptiMove ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* foptimove.cpp - Cursor movement optimization * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FOptiMove ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ // The cursor optimization based on ncurses lib_mvcur.c // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/include/final/fpoint.h b/include/final/fpoint.h index 272f7fdc..364e1e36 100644 --- a/include/final/fpoint.h +++ b/include/final/fpoint.h @@ -1,12 +1,31 @@ -// File: fpoint.h -// Provides: class FPoint -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FPoint ▏ -// ▕▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fpoint.h - Point with an x and y coordinate * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FPoint ▏ + * ▕▁▁▁▁▁▁▁▁▏ + */ #ifndef FPOINT_H #define FPOINT_H diff --git a/include/final/fprogressbar.h b/include/final/fprogressbar.h index 7be0bdd5..cc6a4821 100644 --- a/include/final/fprogressbar.h +++ b/include/final/fprogressbar.h @@ -1,29 +1,48 @@ -// File: fprogressbar.h -// Provides: class FProgressbar -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FProgressbar ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fprogressbar.h - Widget FProgressbar * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FProgressbar ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FPROGRESSBAR_H #define FPROGRESSBAR_H diff --git a/include/final/fradiobutton.h b/include/final/fradiobutton.h index 91a22eb7..d66ca8b1 100644 --- a/include/final/fradiobutton.h +++ b/include/final/fradiobutton.h @@ -1,34 +1,53 @@ -// File: fradiobutton.h -// Provides: class FRadioButton -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FToggleButton ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FRadioButton ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fradiobutton.h - Widget FRadioButton * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FToggleButton ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FRadioButton ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FRADIOBUTTON_H #define FRADIOBUTTON_H diff --git a/include/final/fradiomenuitem.h b/include/final/fradiomenuitem.h index ab3094b2..069f208a 100644 --- a/include/final/fradiomenuitem.h +++ b/include/final/fradiomenuitem.h @@ -1,34 +1,53 @@ -// File: fradiomenuitem.h -// Provides: class FRadioMenuItem -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FMenuItem ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ -// ▕ FRadioMenuItem ▏- - - - -▕ FMenu ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏ +/************************************************************************ +* fradiomenuitem.h - Widget FRadioMenuItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FMenuItem ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ + * ▕ FRadioMenuItem ▏- - - - -▕ FMenu ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏ + */ #ifndef FRADIOMENUITEM_H #define FRADIOMENUITEM_H diff --git a/include/final/frect.h b/include/final/frect.h index 6b9c0d06..a0356c60 100644 --- a/include/final/frect.h +++ b/include/final/frect.h @@ -1,12 +1,31 @@ -// File: frect.h -// Provides: class FRect -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ -// ▕ FRect ▏- - - -▕ FPoint ▏ -// ▕▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* frect.h - Rectangle with position and size * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ + * ▕ FRect ▏- - - -▕ FPoint ▏ + * ▕▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▏ + */ #ifndef FRECT_H #define FRECT_H diff --git a/include/final/fscrollbar.h b/include/final/fscrollbar.h index 0c2b24ac..f7ff4176 100644 --- a/include/final/fscrollbar.h +++ b/include/final/fscrollbar.h @@ -1,29 +1,48 @@ -// File: fscrollbar.h -// Provides: class FScrollbar -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FScrollbar ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fscrollbar.h - Widget FScrollbar * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FScrollbar ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FSCROLLBAR_H #define FSCROLLBAR_H @@ -122,7 +141,7 @@ class FScrollbar : public FWidget int min; int max; double steps; - int pageSize; + int pagesize; int length; int bar_orientation; int max_color; diff --git a/include/final/fscrollview.h b/include/final/fscrollview.h index 7263a20f..488e9a7d 100644 --- a/include/final/fscrollview.h +++ b/include/final/fscrollview.h @@ -1,30 +1,49 @@ -// File: fscrollview.h -// Provides: class FScrollView -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FScrollView ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fscrollview.h - Widget FScrollView (a scrolling area with on-demand * +* scroll bars) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FScrollView ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FSCROLLVIEW_H #define FSCROLLVIEW_H diff --git a/include/final/fstatusbar.h b/include/final/fstatusbar.h index fea0fca7..1204837a 100644 --- a/include/final/fstatusbar.h +++ b/include/final/fstatusbar.h @@ -1,37 +1,55 @@ -// File: fstatusbar.h -// Provides: class FStatusKey -// class FStatusBar -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ├────────────────────┐ -// │ │ -// ▕▔▔▔▔▔▔▔▔▔▏ │ -// ▕ FWindow ▏ │ -// ▕▁▁▁▁▁▁▁▁▁▏ │ -// ▲ │ -// │ │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FStatusBar ▏- - - -▕ FStatusKey ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fstatusbar.h - Widget FStatusBar and FStatusKey * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ├────────────────────┐ + * │ │ + * ▕▔▔▔▔▔▔▔▔▔▏ │ + * ▕ FWindow ▏ │ + * ▕▁▁▁▁▁▁▁▁▁▏ │ + * ▲ │ + * │ │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FStatusBar ▏- - - -▕ FStatusKey ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FSTATUSBAR_H #define FSTATUSBAR_H diff --git a/include/final/fstring.h b/include/final/fstring.h index 66f851e2..99a26291 100644 --- a/include/final/fstring.h +++ b/include/final/fstring.h @@ -1,12 +1,31 @@ -// File: fstring.h -// Provides: class FString -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FString ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fstring.h - Unicode string class with UTF-8 support * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FString ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FSTRING_H #define FSTRING_H @@ -39,6 +58,7 @@ class FString; // Global typedef typedef std::vector FStringList; + //---------------------------------------------------------------------- // class FString //---------------------------------------------------------------------- diff --git a/include/final/fswitch.h b/include/final/fswitch.h index 8668bfce..5fb0804a 100644 --- a/include/final/fswitch.h +++ b/include/final/fswitch.h @@ -1,34 +1,53 @@ -// File: fswitch.h -// Provides: class FSwitch -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FToggleButton ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FSwitch ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fswitch.h - Widget FSwitch * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FToggleButton ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FSwitch ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FSWITCH_H #define FSWITCH_H diff --git a/include/final/ftcap_map.h b/include/final/ftcap_map.h index 99b2b229..bd1d4707 100644 --- a/include/final/ftcap_map.h +++ b/include/final/ftcap_map.h @@ -1,4 +1,23 @@ -// File: ftcap_map.h +/************************************************************************ +* ftcap_map.h - Internally used termcap capabilities * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #ifndef FTCAPMAP_H #define FTCAPMAP_H diff --git a/include/final/fterm.h b/include/final/fterm.h index 03d69d01..f19a87b4 100644 --- a/include/final/fterm.h +++ b/include/final/fterm.h @@ -1,28 +1,47 @@ -// File: fterm.h -// Provides: class FTerm -// -// Base class -// ══════════ -// -// ▕▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FTerm ▏-┬- - - -▕ FOptiMove ▏ -// ▕▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : 1▕▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FOptiAttr ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FString ▏ -// : ▕▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FPoint ▏ -// : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▏ -// └- - - -▕ FRect ▏ -// ▕▁▁▁▁▁▁▁▏ +/************************************************************************ +* fterm.h - Base class for terminal detection and control * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Base class + * ══════════ + * + * ▕▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FTerm ▏-┬- - - -▕ FOptiMove ▏ + * ▕▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : 1▕▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FOptiAttr ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FString ▏ + * : ▕▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FPoint ▏ + * : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▏ + * └- - - -▕ FRect ▏ + * ▕▁▁▁▁▁▁▁▏ + */ #ifndef FTERM_H #define FTERM_H diff --git a/include/final/ftermbuffer.h b/include/final/ftermbuffer.h index 61b1b112..f2afef4b 100644 --- a/include/final/ftermbuffer.h +++ b/include/final/ftermbuffer.h @@ -1,13 +1,31 @@ -// File: ftermbuffer.h -// Provides: class FTermBuffer -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FTermBuffer ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* ftermbuffer.h - Buffer for virtual terminal strings * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FTermBuffer ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FTERMBUFFER_H #define FTERMBUFFER_H diff --git a/include/final/ftermcap.h b/include/final/ftermcap.h index 239710ca..fa093c02 100644 --- a/include/final/ftermcap.h +++ b/include/final/ftermcap.h @@ -1,12 +1,31 @@ -// File: ftermcap.h -// Provides: class FTermcap -// -// Standalone class -// ════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FTermcap ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* ftermcap.h - Provides access to terminal capabilities * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Standalone class + * ════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FTermcap ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FTERMCAP_H #define FTERMCAP_H @@ -16,6 +35,7 @@ #include + //---------------------------------------------------------------------- // class FTermcap //---------------------------------------------------------------------- diff --git a/include/final/ftextview.h b/include/final/ftextview.h index 5f112c36..31e34593 100644 --- a/include/final/ftextview.h +++ b/include/final/ftextview.h @@ -1,29 +1,48 @@ -// File: ftextview.h -// Provides: class FTextView -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FTextView ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* ftextview.h - Widget FTextView (a multiline text viewer) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FTextView ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FTEXTVIEW_H #define FTEXTVIEW_H diff --git a/include/final/ftogglebutton.h b/include/final/ftogglebutton.h index 83cd83da..e89ffe6f 100644 --- a/include/final/ftogglebutton.h +++ b/include/final/ftogglebutton.h @@ -1,29 +1,48 @@ -// File: ftogglebutton.h -// Provides: class FToggleButton -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FToggleButton ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* ftogglebutton.h - Intermediate base class for a toggle button * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FToggleButton ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FTOGGLEBUTTON_H #define FTOGGLEBUTTON_H diff --git a/include/final/ftooltip.h b/include/final/ftooltip.h index 22b4896f..e4ddfac2 100644 --- a/include/final/ftooltip.h +++ b/include/final/ftooltip.h @@ -1,34 +1,53 @@ -// File: ftooltip.h -// Provides: class FTooltip -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FToolTip ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* ftooltip.h - Widget FToolTip * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FToolTip ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FTOOLTIP_H #define FTOOLTIP_H diff --git a/include/final/ftypes.h b/include/final/ftypes.h index 54530d0e..4263cd9d 100644 --- a/include/final/ftypes.h +++ b/include/final/ftypes.h @@ -1,4 +1,23 @@ -// File: ftypes.h +/************************************************************************ +* ftypes.h - Implements global data types * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #ifndef FTYPES_H #define FTYPES_H diff --git a/include/final/fvterm.h b/include/final/fvterm.h index d8644d10..6d52d9a1 100644 --- a/include/final/fvterm.h +++ b/include/final/fvterm.h @@ -1,27 +1,46 @@ -// File: fvterm.h -// Provides: class FVTerm -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏-┬- - - -▕ FString ▏ -// ▕▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FPoint ▏ -// : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▏ -// └- - - -▕ FRect ▏ -// ▕▁▁▁▁▁▁▁▏ +/************************************************************************ +* fvterm.h - Virtual terminal implementation * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏-┬- - - -▕ FString ▏ + * ▕▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FPoint ▏ + * : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▏ + * └- - - -▕ FRect ▏ + * ▕▁▁▁▁▁▁▁▏ + */ #ifndef FVTERM_H #define FVTERM_H @@ -59,6 +78,8 @@ class FVTerm : public FObject, public FTerm typedef FOptiAttr::char_data char_data; typedef void (FVTerm::*FPreprocessingHandler)(); + struct term_area; // forward declaration + struct vterm_preprocessing { FVTerm* instance; @@ -67,58 +88,6 @@ class FVTerm : public FObject, public FTerm typedef std::vector FPreprocessing; - // define virtual terminal character properties - struct term_area - { - public: - term_area() - : offset_left (0) - , offset_top (0) - , width (-1) - , height (-1) - , right_shadow (0) - , bottom_shadow (0) - , cursor_x (0) - , cursor_y (0) - , input_cursor_x (-1) - , input_cursor_y (-1) - , widget() - , preprocessing_call() - , changes (0) - , text (0) - , input_cursor_visible (false) - , has_changes (false) - , visible (false) - { } - - ~term_area() - { } - - int offset_left; // Distance from left terminal side - int offset_top; // Distance from top of the terminal - int width; // Window width - int height; // Window height - int right_shadow; // Right window shadow - int bottom_shadow; // Bottom window shadow - int cursor_x; // X-position for the next write operation - int cursor_y; // Y-position for the next write operation - int input_cursor_x; // X-position input cursor - int input_cursor_y; // Y-position input cursor - FWidget* widget; // Widget that owns this term_area - FPreprocessing preprocessing_call; - line_changes* changes; - char_data* text; // Text data for the output - bool input_cursor_visible; - bool has_changes; - bool visible; - - private: - // Disable copy constructor - term_area (const term_area&); - // Disable assignment operator (=) - term_area& operator = (const term_area&); - }; - enum covered_state { non_covered, @@ -418,9 +387,69 @@ class FVTerm : public FObject, public FTerm static bool stop_terminal_updates; static int skipped_terminal_update; }; - #pragma pack(pop) + +//---------------------------------------------------------------------- +// struct FVTerm::term_area +//---------------------------------------------------------------------- + +#pragma pack(push) +#pragma pack(1) + +struct FVTerm::term_area // define virtual terminal character properties +{ + public: + term_area() + : offset_left (0) + , offset_top (0) + , width (-1) + , height (-1) + , right_shadow (0) + , bottom_shadow (0) + , cursor_x (0) + , cursor_y (0) + , input_cursor_x (-1) + , input_cursor_y (-1) + , widget() + , preprocessing_call() + , changes (0) + , text (0) + , input_cursor_visible (false) + , has_changes (false) + , visible (false) + { } + + ~term_area() + { } + + int offset_left; // Distance from left terminal side + int offset_top; // Distance from top of the terminal + int width; // Window width + int height; // Window height + int right_shadow; // Right window shadow + int bottom_shadow; // Bottom window shadow + int cursor_x; // X-position for the next write operation + int cursor_y; // Y-position for the next write operation + int input_cursor_x; // X-position input cursor + int input_cursor_y; // Y-position input cursor + FWidget* widget; // Widget that owns this term_area + FPreprocessing preprocessing_call; + line_changes* changes; + char_data* text; // Text data for the output + bool input_cursor_visible; + bool has_changes; + bool visible; + + private: + // Disable copy constructor + term_area (const term_area&); + // Disable assignment operator (=) + term_area& operator = (const term_area&); +}; +#pragma pack(pop) + + // FVTerm inline functions //---------------------------------------------------------------------- template diff --git a/include/final/fwidget.h b/include/final/fwidget.h index fbca0d79..1e1428a3 100644 --- a/include/final/fwidget.h +++ b/include/final/fwidget.h @@ -1,72 +1,91 @@ -// File: fwidget.h -// Provides: class FWidget -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏-┬- - - -▕ FStatusBar ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : 1▕▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FMenuBar ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FString ▏ -// : ▕▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FKeyEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FMouseEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FWheelEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FFocusEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FAccelEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FResizeEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FShowEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FHideEvent ▏ -// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ -// └- - - -▕ FCloseEvent ▏ -// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fwidget.h - Intermediate base class for all widget objects * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏-┬- - - -▕ FStatusBar ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : 1▕▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FMenuBar ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FString ▏ + * : ▕▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FKeyEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FMouseEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FWheelEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FFocusEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FAccelEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FResizeEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FShowEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FHideEvent ▏ + * : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ + * └- - - -▕ FCloseEvent ▏ + * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FWIDGET_H #define FWIDGET_H diff --git a/include/final/fwindow.h b/include/final/fwindow.h index 00bcc392..b316ee55 100644 --- a/include/final/fwindow.h +++ b/include/final/fwindow.h @@ -1,37 +1,56 @@ -// File: fwindow.h -// Provides: class FWindow -// -// Inheritance diagram -// ═══════════════════ -// -// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FObject ▏ ▕ FTerm ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ ▲ -// │ │ -// └─────┬─────┘ -// │ -// ▕▔▔▔▔▔▔▔▔▏ -// ▕ FVTerm ▏ -// ▕▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏ -// ▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ -// ▲ -// │ -// ▕▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ -// ▕ FWindow ▏-┬- - - -▕ FEvent ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▏ -// :- - - -▕ FPoint ▏ -// : ▕▁▁▁▁▁▁▁▁▏ -// : -// : *▕▔▔▔▔▔▔▔▔▔▏ -// └- - - -▕ FWidget ▏ -// ▕▁▁▁▁▁▁▁▁▁▏ +/************************************************************************ +* fwindow.h - Intermediate base class for all window objects * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ + +/* Inheritance diagram + * ═══════════════════ + * + * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FObject ▏ ▕ FTerm ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ ▲ + * │ │ + * └─────┬─────┘ + * │ + * ▕▔▔▔▔▔▔▔▔▏ + * ▕ FVTerm ▏ + * ▕▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏ + * ▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + * ▲ + * │ + * ▕▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ + * ▕ FWindow ▏-┬- - - -▕ FEvent ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▏ + * :- - - -▕ FPoint ▏ + * : ▕▁▁▁▁▁▁▁▁▏ + * : + * : *▕▔▔▔▔▔▔▔▔▔▏ + * └- - - -▕ FWidget ▏ + * ▕▁▁▁▁▁▁▁▁▁▏ + */ #ifndef FWINDOW_H #define FWINDOW_H diff --git a/src/fapplication.cpp b/src/fapplication.cpp index 58af611e..32e04174 100644 --- a/src/fapplication.cpp +++ b/src/fapplication.cpp @@ -1,5 +1,23 @@ -// File: fapplication.cpp -// Provides: class FApplication +/************************************************************************ +* fapplication.cpp - Manages the application events * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2013-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -373,6 +391,7 @@ void FApplication::cmd_options () while ( true ) { int c, idx = 0; + static struct option long_options[] = { {"encoding", required_argument, 0, 0 }, @@ -381,6 +400,7 @@ void FApplication::cmd_options () {"newfont", no_argument, 0, 0 }, {0, 0, 0, 0 } }; + opterr = 0; c = getopt_long ( app_argc , app_argv @@ -1262,7 +1282,7 @@ bool FApplication::parseSGRMouse() const FPoint& mouse_position = getMousePos(); register char* p; int button; - uChar x, y; + short x, y; enum x11_ext_btn_states { @@ -1303,7 +1323,7 @@ bool FApplication::parseSGRMouse() { if ( *p < '0' || *p > '9') return false; - x = uChar(10 * x + (*p - '0')); + x = short(10 * x + (*p - '0')); } while ( *p++ && *p != 'M' && *p != 'm' ) @@ -1311,7 +1331,7 @@ bool FApplication::parseSGRMouse() if ( *p < '0' || *p > '9') return false; - y = uChar(10 * y + (*p - '0')); + y = short(10 * y + (*p - '0')); } new_mouse_position.setPoint (x, y); @@ -1431,7 +1451,7 @@ bool FApplication::parseUrxvtMouse() register bool x_neg; register bool y_neg; int button; - uChar x, y; + short x, y; enum urxvt_btn_states { @@ -1481,7 +1501,7 @@ bool FApplication::parseUrxvtMouse() if ( *p < '0' || *p > '9') return false; - x = uChar(10 * x + (*p - '0')); + x = short(10 * x + (*p - '0')); p++; } @@ -1496,7 +1516,7 @@ bool FApplication::parseUrxvtMouse() if ( *p < '0' || *p > '9') return false; - y = uChar(10 * y + (*p - '0')); + y = short(10 * y + (*p - '0')); p++; } @@ -1507,10 +1527,10 @@ bool FApplication::parseUrxvtMouse() y = 1; if ( x > getColumnNumber() ) - x = uChar(getColumnNumber()); + x = short(getColumnNumber()); if ( y > getLineNumber() ) - y = uChar(getLineNumber()); + y = short(getLineNumber()); new_mouse_position.setPoint (x, y); // fill bit field with 0 diff --git a/src/fbutton.cpp b/src/fbutton.cpp index 7f0f3935..839b44a7 100644 --- a/src/fbutton.cpp +++ b/src/fbutton.cpp @@ -1,5 +1,23 @@ -// File: fbutton.cpp -// Provides: class FButton +/************************************************************************ +* fbutton.cpp - Widget FButton * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fbutton.h" @@ -494,16 +512,29 @@ inline void FButton::detectHotkey() //---------------------------------------------------------------------- void FButton::draw() { + int active_focus + , d + , i + , j + , x + , mono_offset + , mono_1st_char + , margin + , length + , hotkeypos + , hotkey_offset + , space; + bool is_ActiveFocus + , is_Active + , is_Focus + , is_Flat + , is_NonFlatShadow + , is_NoUnderline; register wchar_t* src; register wchar_t* dest; wchar_t* ButtonText; FString txt; FWidget* parent_widget = getParentWidget(); - int active_focus; - int d, i, j, x, mono_offset, mono_1st_char, margin; - int length, hotkeypos, hotkey_offset, space; - bool is_ActiveFocus, is_Active, is_Focus, is_Flat; - bool is_NonFlatShadow, is_NoUnderline; length = int(text.getLength()); hotkeypos = -1; @@ -648,7 +679,7 @@ void FButton::draw() if ( getHeight() >= 2 ) j = int((getHeight() - 1) / 2); else - j=0; + j = 0; setPrintPos (1 + margin + d, 1 + j); setColor (button_fg, button_bg); diff --git a/src/fbuttongroup.cpp b/src/fbuttongroup.cpp index 16caff5a..3cf48386 100644 --- a/src/fbuttongroup.cpp +++ b/src/fbuttongroup.cpp @@ -1,5 +1,24 @@ -// File: fbuttongroup.cpp -// Provides: class FButtonGroup +/************************************************************************ +* fbuttongroup.cpp - The FButtonGroup widget organizes FToggleButton * +* widgets in a group. * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fbuttongroup.h" diff --git a/src/fcheckbox.cpp b/src/fcheckbox.cpp index ebdec5ac..2f872045 100644 --- a/src/fcheckbox.cpp +++ b/src/fcheckbox.cpp @@ -1,5 +1,23 @@ -// File: fcheckbox.cpp -// Provides: class FCheckBox +/************************************************************************ +* fcheckbox.cpp - Widget FCheckBox * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fcheckbox.h" diff --git a/src/fcheckmenuitem.cpp b/src/fcheckmenuitem.cpp index 6c9aab38..a7da6b4d 100644 --- a/src/fcheckmenuitem.cpp +++ b/src/fcheckmenuitem.cpp @@ -1,9 +1,28 @@ -// File: fcheckmenuitem.cpp -// Provides: class FCheckMenuItem +/************************************************************************ +* fcheckmenuitem.cpp - Widget FCheckMenuItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fcheckmenuitem.h" #include "final/fmenu.h" + //---------------------------------------------------------------------- // class FCheckMenuItem //---------------------------------------------------------------------- diff --git a/src/fdialog.cpp b/src/fdialog.cpp index 6c69bb3b..4d150c31 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -1,5 +1,23 @@ -// File: fdialog.cpp -// Provides: class FDialog +/************************************************************************ +* fdialog.cpp - Widget FDialog * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fdialog.h" @@ -178,7 +196,7 @@ int FDialog::exec() //---------------------------------------------------------------------- void FDialog::setPos (int x, int y, bool) { - int dx, dy, old_x, old_y, rsw, bsh, width, height; + int rsw, bsh, width, height; FRect old_geometry; if ( getX() == x && getY() == y ) @@ -194,10 +212,10 @@ void FDialog::setPos (int x, int y, bool) if ( isZoomed() ) return; - dx = getX() - x; - dy = getY() - y; - old_x = getTermX(); - old_y = getTermY(); + int dx = getX() - x + , dy = getY() - y + , old_x = getTermX() + , old_y = getTermY(); const FPoint& shadow = getShadow(); rsw = shadow.getX(); // right shadow width; bsh = shadow.getY(); // bottom shadow height @@ -291,7 +309,6 @@ void FDialog::move (int dx, int dy) //---------------------------------------------------------------------- void FDialog::setSize (int w, int h, bool adjust) { - int x, y, dw, dh, old_width, old_height, rsw, bsh; if ( getWidth() == w && getHeight() == h ) return; @@ -299,15 +316,15 @@ void FDialog::setSize (int w, int h, bool adjust) if ( isZoomed() ) return; - x = getTermX(); - y = getTermY(); - old_width = getWidth(); - old_height = getHeight(); - dw = old_width - w; - dh = old_height - h; + int x = getTermX() + , y = getTermY() + , old_width = getWidth() + , old_height = getHeight() + , dw = old_width - w + , dh = old_height - h; const FPoint& shadow = getShadow(); - rsw = shadow.getX(); // right shadow width; - bsh = shadow.getY(); // bottom shadow height + int rsw = shadow.getX(); // right shadow width; + int bsh = shadow.getY(); // bottom shadow height FWindow::setSize (w, h, adjust); @@ -529,9 +546,9 @@ void FDialog::onKeyPress (FKeyEvent* ev) //---------------------------------------------------------------------- void FDialog::onMouseDown (FMouseEvent* ev) { - int mouse_x = ev->getX(); - int mouse_y = ev->getY(); - int zoom_btn; + int mouse_x = ev->getX() + , mouse_y = ev->getY() + , zoom_btn; if ( ! isResizeable() ) zoom_btn = 0; @@ -651,10 +668,10 @@ void FDialog::onMouseUp (FMouseEvent* ev) if ( ev->getButton() == fc::LeftButton ) { - int mouse_x = ev->getX(); - int mouse_y = ev->getY(); - int titlebar_x = titlebar_click_pos.getX(); - int titlebar_y = titlebar_click_pos.getY(); + int mouse_x = ev->getX() + , mouse_y = ev->getY() + , titlebar_x = titlebar_click_pos.getX() + , titlebar_y = titlebar_click_pos.getY(); if ( ! titlebar_click_pos.isNull() && titlebar_x > getTermX() + 3 @@ -689,10 +706,10 @@ void FDialog::onMouseUp (FMouseEvent* ev) { FWidget* r = getRootWidget(); resize_click_pos = ev->getTermPos(); - int x2 = resize_click_pos.getX(); - int y2 = resize_click_pos.getY(); - int x2_offset = 0; - int y2_offset = 0; + int x2 = resize_click_pos.getX() + , y2 = resize_click_pos.getY() + , x2_offset = 0 + , y2_offset = 0; if ( r ) { @@ -800,10 +817,10 @@ void FDialog::onMouseMove (FMouseEvent* ev) { FWidget* r = getRootWidget(); resize_click_pos = ev->getTermPos(); - int x2 = resize_click_pos.getX(); - int y2 = resize_click_pos.getY(); - int x2_offset = 0; - int y2_offset = 0; + int x2 = resize_click_pos.getX() + , y2 = resize_click_pos.getY() + , x2_offset = 0 + , y2_offset = 0; if ( r ) { @@ -832,7 +849,11 @@ void FDialog::onMouseMove (FMouseEvent* ev) //---------------------------------------------------------------------- void FDialog::onMouseDoubleClick (FMouseEvent* ev) { - int x, y, mouse_x, mouse_y, zoom_btn; + int x + , y + , mouse_x + , mouse_y + , zoom_btn; if ( ev->getButton() != fc::LeftButton ) return; @@ -1160,10 +1181,10 @@ void FDialog::init() //---------------------------------------------------------------------- void FDialog::drawBorder() { - int x1 = 1; - int x2 = 1 + getWidth() - 1; - int y1 = 2; - int y2 = 1 + getHeight() - 1; + int x1 = 1 + , x2 = 1 + getWidth() - 1 + , y1 = 2 + , y2 = 1 + getHeight() - 1; if ( (getMoveSizeWidget() == this || ! resize_click_pos.isNull()) && ! isZoomed() ) @@ -1204,7 +1225,10 @@ void FDialog::drawBorder() void FDialog::drawTitleBar() { static const int menu_btn = 3; - int i, x, length, zoom_btn; + int i + , x + , length + , zoom_btn; // draw the title button setPrintPos (1, 1); diff --git a/src/fdialoglistmenu.cpp b/src/fdialoglistmenu.cpp index 2b186da9..98e710f0 100644 --- a/src/fdialoglistmenu.cpp +++ b/src/fdialoglistmenu.cpp @@ -1,9 +1,27 @@ -// File: fdialoglistmenu.cpp -// Provides: class FDialogListMenu - +/************************************************************************ +* fdialoglistmenu.cpp - Widget FDialogListMenu * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fdialoglistmenu.h" + //---------------------------------------------------------------------- // class FDialogListMenu //---------------------------------------------------------------------- diff --git a/src/fevent.cpp b/src/fevent.cpp index 90ea14e1..773c6e12 100644 --- a/src/fevent.cpp +++ b/src/fevent.cpp @@ -1,5 +1,23 @@ -// File: fevent.cpp -// Provides: class FEvent +/************************************************************************ +* fevent.cpp - Base event class of widgets * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include diff --git a/src/ffiledialog.cpp b/src/ffiledialog.cpp index b928defe..e5328ba9 100644 --- a/src/ffiledialog.cpp +++ b/src/ffiledialog.cpp @@ -1,5 +1,23 @@ -// File: ffiledialog.cpp -// Provides: class FFileDialog +/************************************************************************ +* ffiledialog.cpp - Widget FFileDialog (a file chooser dialog) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -326,9 +344,9 @@ int FFileDialog::readDir() } if ( std::strcmp((*dir_entries.begin()).name, "..") == 0 ) - start=1; + start = 1; else - start=0; + start = 0; dir_num = numOfDirs(); // directories first @@ -457,7 +475,11 @@ const FString FFileDialog::fileSaveChooser ( FWidget* parent //---------------------------------------------------------------------- void FFileDialog::adjustSize() { - int h, X, Y, max_width, max_height; + int h + , X + , Y + , max_width + , max_height; FWidget* root_widget = getRootWidget(); if ( root_widget ) diff --git a/src/flabel.cpp b/src/flabel.cpp index bd61d57a..231ff2f0 100644 --- a/src/flabel.cpp +++ b/src/flabel.cpp @@ -1,5 +1,23 @@ -// File: flabel.cpp -// Provides: class FLabel +/************************************************************************ +* flabel.cpp - Widget FLabel * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/flabel.h" diff --git a/src/flineedit.cpp b/src/flineedit.cpp index 1a54aee8..5af4cd27 100644 --- a/src/flineedit.cpp +++ b/src/flineedit.cpp @@ -1,5 +1,23 @@ -// File: flineedit.cpp -// Provides: class FLineEdit +/************************************************************************ +* flineedit.cpp - Widget FLineEdit * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/flineedit.h" @@ -330,7 +348,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) cursor_pos--; if ( cursor_pos < 0 ) - cursor_pos=0; + cursor_pos = 0; if ( cursor_pos < text_offset ) text_offset--; @@ -342,7 +360,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) cursor_pos++; if ( cursor_pos >= len ) - cursor_pos=len; + cursor_pos = len; if ( cursor_pos - text_offset >= getWidth() - 2 && text_offset <= len - getWidth() + 1 ) @@ -352,13 +370,13 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) break; case fc::Fkey_home: - cursor_pos=0; - text_offset=0; + cursor_pos = 0; + text_offset = 0; ev->accept(); break; case fc::Fkey_end: - cursor_pos=len; + cursor_pos = len; if ( cursor_pos >= getWidth() - 1 ) text_offset = len - getWidth() + 2; ev->accept(); @@ -372,7 +390,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev) } if ( cursor_pos >= len ) - cursor_pos=len; + cursor_pos = len; if ( cursor_pos < 0 ) cursor_pos = 0; @@ -530,7 +548,7 @@ void FLineEdit::onMouseMove (FMouseEvent* ev) cursor_pos = text_offset + mouse_x - 2; if ( cursor_pos >= len ) - cursor_pos=len; + cursor_pos = len; drawInputField(); updateTerminal(); diff --git a/src/flistbox.cpp b/src/flistbox.cpp index 41f23b79..61a39b49 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -1,6 +1,23 @@ -// File: flistbox.cpp -// Provides: class FListBoxItem -// class FListBox +/************************************************************************ +* flistbox.cpp - Widget FListBox and FListBoxItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -406,13 +423,14 @@ void FListBox::clear() void FListBox::onKeyPress (FKeyEvent* ev) { static const int padding_space = 2; // 1 leading space + 1 tailing space - int element_count = int(getCount()); - int current_before = current; - int xoffset_before = xoffset; - int xoffset_end = max_line_width - getClientWidth() + padding_space; - int yoffset_before = yoffset; - int yoffset_end = element_count - getClientHeight(); - int key = ev->key(); + int element_count = int(getCount()) + , current_before = current + , xoffset_before = xoffset + , xoffset_end = max_line_width - getClientWidth() + padding_space + , yoffset_before = yoffset + , yoffset_end = element_count - getClientHeight() + , pagesize = getClientHeight() - 1 + , key = ev->key(); switch ( key ) { @@ -427,7 +445,7 @@ void FListBox::onKeyPress (FKeyEvent* ev) current--; if ( current < 1 ) - current=1; + current = 1; if ( current <= yoffset ) yoffset--; @@ -473,17 +491,17 @@ void FListBox::onKeyPress (FKeyEvent* ev) break; case fc::Fkey_ppage: - current -= getClientHeight() - 1; + current -= pagesize; if ( current < 1 ) - current=1; + current = 1; if ( current <= yoffset ) { - yoffset -= getClientHeight() - 1; + yoffset -= pagesize; if ( yoffset < 0 ) - yoffset=0; + yoffset = 0; } inc_search.clear(); @@ -491,14 +509,14 @@ void FListBox::onKeyPress (FKeyEvent* ev) break; case fc::Fkey_npage: - current += getClientHeight() - 1; + current += pagesize; if ( current > element_count ) current = element_count; if ( current - yoffset > getClientHeight() ) { - yoffset += getClientHeight() - 1; + yoffset += pagesize; if ( yoffset > yoffset_end ) yoffset = yoffset_end; @@ -710,7 +728,9 @@ void FListBox::onKeyPress (FKeyEvent* ev) //---------------------------------------------------------------------- void FListBox::onMouseDown (FMouseEvent* ev) { - int yoffset_before, mouse_x, mouse_y; + int yoffset_before + , mouse_x + , mouse_y; if ( ev->getButton() != fc::LeftButton && ev->getButton() != fc::RightButton ) @@ -811,7 +831,10 @@ void FListBox::onMouseUp (FMouseEvent* ev) //---------------------------------------------------------------------- void FListBox::onMouseMove (FMouseEvent* ev) { - int current_before, yoffset_before, mouse_x, mouse_y; + int current_before + , yoffset_before + , mouse_x + , mouse_y; if ( ev->getButton() != fc::LeftButton && ev->getButton() != fc::RightButton ) @@ -966,10 +989,10 @@ void FListBox::onMouseDoubleClick (FMouseEvent* ev) //---------------------------------------------------------------------- void FListBox::onTimer (FTimerEvent*) { - int element_count = int(getCount()); - int current_before = current; - int yoffset_before = yoffset; - int yoffset_end = element_count - getClientHeight(); + int element_count = int(getCount()) + , current_before = current + , yoffset_before = yoffset + , yoffset_end = element_count - getClientHeight(); switch ( int(drag_scroll) ) { @@ -978,7 +1001,7 @@ void FListBox::onTimer (FTimerEvent*) case fc::scrollUp: case fc::scrollUpSelect: - if ( current_before == 1) + if ( current_before == 1 ) { drag_scroll = fc::noScroll; return; @@ -987,13 +1010,13 @@ void FListBox::onTimer (FTimerEvent*) current -= scroll_distance; if ( current < 1 ) - current=1; + current = 1; if ( current <= yoffset ) yoffset -= scroll_distance; if ( yoffset < 0 ) - yoffset=0; + yoffset = 0; break; case fc::scrollDown: @@ -1040,7 +1063,7 @@ void FListBox::onTimer (FTimerEvent*) to = current; } - for (int i=from; i <= to; i++) + for (int i = from; i <= to; i++) { if ( mouse_select ) { @@ -1073,11 +1096,12 @@ void FListBox::onTimer (FTimerEvent*) //---------------------------------------------------------------------- void FListBox::onWheel (FWheelEvent* ev) { - int element_count, current_before, yoffset_before, yoffset_end, wheel; - element_count = int(getCount()); - current_before = current; - yoffset_before = yoffset; - yoffset_end = element_count - getClientHeight(); + int wheel + , element_count = int(getCount()) + , current_before = current + , yoffset_before = yoffset + , yoffset_end = element_count - getClientHeight() + , pagesize = 4; if ( yoffset_end < 0 ) yoffset_end = 0; @@ -1098,18 +1122,18 @@ void FListBox::onWheel (FWheelEvent* ev) if ( yoffset == 0 ) break; - yoffset -= 4; + yoffset -= pagesize; if ( yoffset < 0 ) { - current -= 4 + yoffset; - yoffset=0; + current -= pagesize + yoffset; + yoffset = 0; } else - current -= 4; + current -= pagesize; if ( current < 1 ) - current=1; + current = 1; inc_search.clear(); break; @@ -1118,15 +1142,15 @@ void FListBox::onWheel (FWheelEvent* ev) if ( yoffset == yoffset_end ) break; - yoffset += 4; + yoffset += pagesize; if ( yoffset > yoffset_end ) { - current += 4 - (yoffset - yoffset_end); + current += pagesize - (yoffset - yoffset_end); yoffset = yoffset_end; } else - current += 4; + current += pagesize; if ( current > element_count ) current = element_count; @@ -1187,6 +1211,9 @@ void FListBox::adjustYOffset() { int element_count = int(getCount()); + if ( element_count == 0 ) + return; + if ( yoffset > element_count - getClientHeight() ) yoffset = element_count - getClientHeight(); @@ -1402,10 +1429,10 @@ void FListBox::drawList() for (uInt y = start; y < num; y++) { - bool serach_mark = false; - bool lineHasBrackets = hasBrackets(iter); - bool isLineSelected = isSelected(iter); - bool isCurrentLine = bool(y + uInt(yoffset) + 1 == uInt(current)); + bool serach_mark = false + , lineHasBrackets = hasBrackets(iter) + , isLineSelected = isSelected(iter) + , isCurrentLine = bool(y + uInt(yoffset) + 1 == uInt(current)); if ( conv_type == lazy_convert && iter->getText().isNull() ) { @@ -1497,13 +1524,13 @@ void FListBox::drawList() if ( lineHasBrackets ) { int full_length; - uInt len; - uInt i = 0; - uInt b = 0; + uInt len + , i = 0 + , b = 0; if ( xoffset == 0 ) { - b=1; + b = 1; switch ( iter->brackets ) { @@ -1690,10 +1717,10 @@ void FListBox::processChanged() void FListBox::cb_VBarChange (FWidget*, data_ptr) { FScrollbar::sType scrollType; - int distance = 1; - int element_count = int(getCount()); - int yoffset_before = yoffset; - int yoffset_end = element_count - getClientHeight(); + int distance = 1 + , element_count = int(getCount()) + , yoffset_before = yoffset + , yoffset_end = element_count - getClientHeight(); scrollType = vbar->getScrollType(); switch ( scrollType ) @@ -1708,7 +1735,7 @@ void FListBox::cb_VBarChange (FWidget*, data_ptr) current -= distance; if ( current < 1 ) - current=1; + current = 1; if ( current <= yoffset ) yoffset -= distance; @@ -1798,9 +1825,10 @@ void FListBox::cb_HBarChange (FWidget*, data_ptr) { static const int padding_space = 2; // 1 leading space + 1 tailing space FScrollbar::sType scrollType; - int distance = 1; - int xoffset_before = xoffset; - int xoffset_end = max_line_width - getClientWidth() + padding_space; + int distance = 1 + , pagesize = 4 + , xoffset_before = xoffset + , xoffset_end = max_line_width - getClientWidth() + padding_space; scrollType = hbar->getScrollType(); switch ( scrollType ) @@ -1854,7 +1882,7 @@ void FListBox::cb_HBarChange (FWidget*, data_ptr) if ( xoffset == 0 ) break; - xoffset -= 4; + xoffset -= pagesize; if ( xoffset < 0 ) xoffset = 0; @@ -1865,7 +1893,7 @@ void FListBox::cb_HBarChange (FWidget*, data_ptr) if ( xoffset == xoffset_end ) break; - xoffset += 4; + xoffset += pagesize; if ( xoffset > xoffset_end ) xoffset = xoffset_end; diff --git a/src/fmenu.cpp b/src/fmenu.cpp index 9bb2a4f2..cf7f1f45 100644 --- a/src/fmenu.cpp +++ b/src/fmenu.cpp @@ -1,5 +1,23 @@ -// File: fmenu.cpp -// Provides: class FMenu +/************************************************************************ +* fmenu.cpp - Widget FMenu * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -305,12 +323,11 @@ void FMenu::onMouseDown (FMouseEvent* ev) while ( iter != last ) { - int x1, x2, y, mouse_x, mouse_y; - x1 = (*iter)->getX(); - x2 = (*iter)->getX() + (*iter)->getWidth(); - y = (*iter)->getY(); - mouse_x = mouse_pos.getX(); - mouse_y = mouse_pos.getY(); + int x1 = (*iter)->getX() + , x2 = (*iter)->getX() + (*iter)->getWidth() + , y = (*iter)->getY() + , mouse_x = mouse_pos.getX() + , mouse_y = mouse_pos.getY(); if ( mouse_x >= x1 && mouse_x < x2 @@ -410,10 +427,9 @@ void FMenu::onMouseUp (FMouseEvent* ev) while ( iter != last ) { - int x1, x2, y; - x1 = (*iter)->getX(); - x2 = (*iter)->getX() + (*iter)->getWidth(); - y = (*iter)->getY(); + int x1 = (*iter)->getX() + , x2 = (*iter)->getX() + (*iter)->getWidth() + , y = (*iter)->getY(); if ( (*iter)->isSelected() ) { @@ -482,12 +498,12 @@ void FMenu::onMouseMove (FMouseEvent* ev) { std::vector::const_iterator iter, last; FMenu* smenu = 0; - bool focus_changed = false; - bool mouse_over_menu = false; - bool mouse_over_submenu = false; - bool mouse_over_supermenu = false; - bool mouse_over_menubar = false; - bool hide_sub_menu = false; + bool focus_changed = false + , mouse_over_menu = false + , mouse_over_submenu = false + , mouse_over_supermenu = false + , mouse_over_menubar = false + , hide_sub_menu = false; FMenu* show_sub_menu = 0; FPoint mouse_pos; @@ -523,12 +539,11 @@ void FMenu::onMouseMove (FMouseEvent* ev) while ( iter != last ) { - int x1, x2, y, mouse_x, mouse_y; - x1 = (*iter)->getX(); - x2 = (*iter)->getX() + (*iter)->getWidth(); - y = (*iter)->getY(); - mouse_x = mouse_pos.getX(); - mouse_y = mouse_pos.getY(); + int x1 = (*iter)->getX() + , x2 = (*iter)->getX() + (*iter)->getWidth() + , y = (*iter)->getY() + , mouse_x = mouse_pos.getX() + , mouse_y = mouse_pos.getY(); if ( mouse_x >= x1 && mouse_x < x2 @@ -814,7 +829,9 @@ void FMenu::init(FWidget* parent) //---------------------------------------------------------------------- void FMenu::calculateDimensions() { - int item_X, item_Y, adjust_X; + int item_X + , item_Y + , adjust_X; std::vector::const_iterator iter, last; iter = item_list.begin(); last = item_list.end(); @@ -1261,14 +1278,14 @@ void FMenu::drawItems() FString txt; uInt txt_length; int hotkeypos, to_char; - int accel_key = (*iter)->accel_key; - bool has_menu = (*iter)->hasMenu(); - bool is_enabled = (*iter)->isEnabled(); - bool is_checked = (*iter)->isChecked(); - bool is_checkable = (*iter)->checkable; - bool is_radio_btn = (*iter)->radio_button; - bool is_selected = (*iter)->isSelected(); - bool is_noUnderline = (((*iter)->getFlags() & fc::no_underline) != 0); + int accel_key = (*iter)->accel_key; + bool has_menu = (*iter)->hasMenu() + , is_enabled = (*iter)->isEnabled() + , is_checked = (*iter)->isChecked() + , is_checkable = (*iter)->checkable + , is_radio_btn = (*iter)->radio_button + , is_selected = (*iter)->isSelected() + , is_noUnderline = (((*iter)->getFlags() & fc::no_underline) != 0); if ( is_enabled ) { diff --git a/src/fmenubar.cpp b/src/fmenubar.cpp index c30fd22c..0e0b4901 100644 --- a/src/fmenubar.cpp +++ b/src/fmenubar.cpp @@ -1,5 +1,23 @@ -// File: fmenubar.cpp -// Provides: class FMenuBar +/************************************************************************ +* fmenubar.cpp - Widget FMenuBar * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -779,8 +797,12 @@ void FMenuBar::drawItems() wchar_t* item_text; FString txt; uInt txt_length; - int hotkeypos, startpos, to_char; - bool is_active, is_selected, is_noUnderline; + int hotkeypos + , startpos + , to_char; + bool is_active + , is_selected + , is_noUnderline; startpos = x + 1; is_active = (*iter)->isEnabled(); diff --git a/src/fmenuitem.cpp b/src/fmenuitem.cpp index 470f64ea..67df1376 100644 --- a/src/fmenuitem.cpp +++ b/src/fmenuitem.cpp @@ -1,5 +1,23 @@ -// File: fmenuitem.cpp -// Provides: class FMenuItem +/************************************************************************ +* fmenuitem.cpp - Widget FMenuItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fdialog.h" diff --git a/src/fmenulist.cpp b/src/fmenulist.cpp index 1657c13a..5ee5cd5a 100644 --- a/src/fmenulist.cpp +++ b/src/fmenulist.cpp @@ -1,10 +1,29 @@ -// File: fmenulist.cpp -// Provides: class FMenuList +/************************************************************************ +* fmenulist.cpp - Menu item container base class * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include "final/fmenulist.h" + //---------------------------------------------------------------------- // class FMenuList //---------------------------------------------------------------------- diff --git a/src/fmessagebox.cpp b/src/fmessagebox.cpp index a65a5adb..bf8c4eb3 100644 --- a/src/fmessagebox.cpp +++ b/src/fmessagebox.cpp @@ -1,5 +1,23 @@ -// File: fmessagebox.cpp -// Provides: class FMessageBox +/************************************************************************ +* fmessagebox.cpp - Widget FMessageBox (a text message window) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -259,7 +277,10 @@ int FMessageBox::error ( FWidget* parent //---------------------------------------------------------------------- void FMessageBox::adjustSize() { - int X, Y, max_width, max_height; + int X + , Y + , max_width + , max_height; FWidget* root_widget = getRootWidget(); if ( root_widget ) diff --git a/src/fobject.cpp b/src/fobject.cpp index 99223f0e..1facf807 100644 --- a/src/fobject.cpp +++ b/src/fobject.cpp @@ -1,5 +1,23 @@ -// File: fobject.cpp -// Provides: class FObject +/************************************************************************ +* fobject.cpp - Object container base class of all widget objects * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fobject.h" diff --git a/src/foptiattr.cpp b/src/foptiattr.cpp index ee05191e..4b9da5e2 100644 --- a/src/foptiattr.cpp +++ b/src/foptiattr.cpp @@ -1,5 +1,23 @@ -// File: foptiattr.cpp -// Provides: class FOptiAttr +/************************************************************************ +* foptiattr.cpp - Sets video attributes in optimized order * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include diff --git a/src/foptimove.cpp b/src/foptimove.cpp index f576dffa..8cf0db29 100644 --- a/src/foptimove.cpp +++ b/src/foptimove.cpp @@ -1,5 +1,23 @@ -// File: foptimove.cpp -// Provides: class FOptiMove +/************************************************************************ +* foptimove.cpp - Cursor movement optimization * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -473,9 +491,9 @@ char* FOptiMove::moveCursor (int xold, int yold, int xnew, int ynew) char* null_ptr = null_result; char* move_ptr = move_buf; char* move_xy; - int method = 0; - int new_time; - int move_time = LONG_DURATION; + int method = 0 + , new_time + , move_time = LONG_DURATION; // Method 0: direct cursor addressing move_xy = tgoto(F_cursor_address.cap, xnew, ynew); @@ -696,7 +714,7 @@ int FOptiMove::capDuration (char*& cap, int affcnt) // check for delay with padding character if ( p[0] == '$' && p[1] == '<' && std::strchr(p, '>') ) { - float num=0; + float num = 0; for (p += 2; *p != '>'; p++) { @@ -763,9 +781,9 @@ int FOptiMove::relativeMove ( char*& move , int from_x, int from_y , int to_x, int to_y ) { - int num; - int vtime = 0; - int htime = 0; + int num + , vtime = 0 + , htime = 0; if ( move ) move[0] = '\0'; diff --git a/src/fpoint.cpp b/src/fpoint.cpp index d884df5d..f24db572 100644 --- a/src/fpoint.cpp +++ b/src/fpoint.cpp @@ -1,5 +1,23 @@ -// File: fpoint.cpp -// Provides: class FPoint +/************************************************************************ +* fpoint.cpp - Point with an x and y coordinate * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fpoint.h" diff --git a/src/fprogressbar.cpp b/src/fprogressbar.cpp index 3fa97445..957b3f2f 100644 --- a/src/fprogressbar.cpp +++ b/src/fprogressbar.cpp @@ -1,8 +1,27 @@ -// File: fprogressbar.cpp -// Provides: class FProgressbar +/************************************************************************ +* fprogressbar.cpp - Widget FProgressbar * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fprogressbar.h" + //---------------------------------------------------------------------- // class FProgressbar //---------------------------------------------------------------------- diff --git a/src/fradiobutton.cpp b/src/fradiobutton.cpp index b9b932f9..fe1e17f7 100644 --- a/src/fradiobutton.cpp +++ b/src/fradiobutton.cpp @@ -1,5 +1,23 @@ -// File: fradiobutton.cpp -// Provides: class FRadioButton +/************************************************************************ +* fradiobutton.cpp - Widget FRadioButton * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fradiobutton.h" diff --git a/src/fradiomenuitem.cpp b/src/fradiomenuitem.cpp index 718b8a05..3ab02cbe 100644 --- a/src/fradiomenuitem.cpp +++ b/src/fradiomenuitem.cpp @@ -1,9 +1,28 @@ -// File: fradiomenuitem.cpp -// Provides: class FRadioMenuItem +/************************************************************************ +* fradiomenuitem.cpp - Widget FRadioMenuItem * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fradiomenuitem.h" #include "final/fmenu.h" + //---------------------------------------------------------------------- // class FRadioMenuItem //---------------------------------------------------------------------- diff --git a/src/frect.cpp b/src/frect.cpp index f996ebba..696d3a7e 100644 --- a/src/frect.cpp +++ b/src/frect.cpp @@ -1,5 +1,23 @@ -// File: frect.cpp -// Provides: class FRect +/************************************************************************ +* frect.cpp - Rectangle with position and size * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include diff --git a/src/fscrollbar.cpp b/src/fscrollbar.cpp index ce58e425..8378fd5a 100644 --- a/src/fscrollbar.cpp +++ b/src/fscrollbar.cpp @@ -1,10 +1,29 @@ -// File: fscrollbar.cpp -// Provides: class FScrollbar +/************************************************************************ +* fscrollbar.cpp - Widget FScrollbar * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include "final/fscrollbar.h" + //---------------------------------------------------------------------- // class FScrollbar //---------------------------------------------------------------------- @@ -27,7 +46,7 @@ FScrollbar::FScrollbar(FWidget* parent) , min(0) , max(99) , steps(1) - , pageSize(0) + , pagesize(0) , length(20) , bar_orientation(fc::vertical) , max_color(getMaxColor()) @@ -54,7 +73,7 @@ FScrollbar::FScrollbar(int o, FWidget* parent) , min(0) , max(99) , steps(1) - , pageSize(0) + , pagesize(0) , length(20) , bar_orientation(fc::vertical) , max_color(getMaxColor()) @@ -108,8 +127,8 @@ void FScrollbar::setSteps (double st) else steps = st; - if ( pageSize == 0 ) - pageSize = int(double(max)/steps); + if ( pagesize == 0 ) + pagesize = int(double(max)/steps); } //---------------------------------------------------------------------- @@ -117,12 +136,12 @@ void FScrollbar::setPageSize (int document_size, int page_size) { if ( page_size == 0 ) { - pageSize = document_size; + pagesize = document_size; steps = 1.0; } else { - pageSize = page_size; + pagesize = page_size; steps = double(double(document_size) / double(page_size)); } } diff --git a/src/fscrollview.cpp b/src/fscrollview.cpp index d2e273ca..3eca72b8 100644 --- a/src/fscrollview.cpp +++ b/src/fscrollview.cpp @@ -1,5 +1,24 @@ -// File: fscrollview.cpp -// Provides: class FScrollView +/************************************************************************ +* fscrollview.cpp - Widget FScrollView (a scrolling area with on-demand * +* scroll bars) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fscrollview.h" #include "final/fwindow.h" @@ -96,7 +115,8 @@ void FScrollView::setScrollHeight (int height) //---------------------------------------------------------------------- void FScrollView::setScrollSize (int width, int height) { - int xoffset_end, yoffset_end; + int xoffset_end + , yoffset_end; if ( width < getViewportWidth() ) width = getViewportWidth(); @@ -506,7 +526,7 @@ void FScrollView::onWheel (FWheelEvent* ev) yoffset -= 4; if ( yoffset < 0 ) - yoffset=0; + yoffset = 0; break; @@ -588,11 +608,12 @@ void FScrollView::onChildFocusIn (FFocusEvent*) if ( ! vp_geometry.contains(widget_geometry) ) { - int x, y; - int vx = vp_geometry.getX(); - int vy = vp_geometry.getY(); - int wx = widget_geometry.getX(); - int wy = widget_geometry.getY(); + int x + , y + , vx = vp_geometry.getX() + , vy = vp_geometry.getY() + , wx = widget_geometry.getX() + , wy = widget_geometry.getY(); if ( wx > vx ) x = widget_geometry.getX2() - vp_geometry.getWidth() + 1; @@ -659,10 +680,10 @@ FVTerm::term_area* FScrollView::getPrintArea() void FScrollView::adjustSize() { FWidget::adjustSize(); - int width = getWidth(); - int height = getHeight(); - int xoffset = viewport_geometry.getX(); - int yoffset = viewport_geometry.getY(); + int width = getWidth() + , height = getHeight() + , xoffset = viewport_geometry.getX() + , yoffset = viewport_geometry.getY(); scroll_geometry.setPos ( getTermX() + getLeftPadding() - 1 , getTermY() + getTopPadding() - 1 ); @@ -695,8 +716,6 @@ void FScrollView::copy2area() { // copy viewport to area - int ax, ay, dx, dy, y_end, x_end; - if ( ! hasPrintArea() ) FVTerm::getPrintArea(); @@ -706,12 +725,12 @@ void FScrollView::copy2area() if ( ! viewport->has_changes ) return; - ax = getTermX() - print_area->offset_left; - ay = getTermY() - print_area->offset_top; - dx = viewport_geometry.getX(); - dy = viewport_geometry.getY(); - y_end = getViewportHeight(); - x_end = getViewportWidth(); + int ax = getTermX() - print_area->offset_left + , ay = getTermY() - print_area->offset_top + , dx = viewport_geometry.getX() + , dy = viewport_geometry.getY() + , y_end = getViewportHeight() + , x_end = getViewportWidth(); for (int y = 0; y < y_end; y++) // line loop { @@ -744,11 +763,11 @@ inline FPoint FScrollView::getViewportCursorPos() if ( window ) { - int widget_offsetX = getTermX() - window->getTermX(); - int widget_offsetY = getTermY() - window->getTermY(); - int x = widget_offsetX + viewport->input_cursor_x - - viewport_geometry.getX(); - int y = widget_offsetY + viewport->input_cursor_y + int widget_offsetX = getTermX() - window->getTermX() + , widget_offsetY = getTermY() - window->getTermY() + , x = widget_offsetX + viewport->input_cursor_x + - viewport_geometry.getX() + , y = widget_offsetY + viewport->input_cursor_y - viewport_geometry.getY(); return FPoint (x, y); } @@ -759,7 +778,8 @@ inline FPoint FScrollView::getViewportCursorPos() //---------------------------------------------------------------------- void FScrollView::init (FWidget* parent) { - int xoffset_end, yoffset_end; + int xoffset_end + , yoffset_end; assert ( parent != 0 ); assert ( ! parent->isInstanceOf("FScrollView") ); @@ -974,7 +994,7 @@ void FScrollView::cb_VBarChange (FWidget*, data_ptr) yoffset -= 4; if ( yoffset < 0 ) - yoffset=0; + yoffset = 0; break; @@ -1082,7 +1102,7 @@ void FScrollView::cb_HBarChange (FWidget*, data_ptr) xoffset -= 4; if ( xoffset < 0 ) - xoffset=0; + xoffset = 0; break; diff --git a/src/fstatusbar.cpp b/src/fstatusbar.cpp index 46ea4ec8..139ed968 100644 --- a/src/fstatusbar.cpp +++ b/src/fstatusbar.cpp @@ -1,11 +1,29 @@ -// File: fstatusbar.cpp -// Provides: class FStatusKey -// class FStatusBar +/************************************************************************ +* fstatusbar.cpp - Widget FStatusBar and FStatusKey * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include "final/fstatusbar.h" + //---------------------------------------------------------------------- // class FStatusKey //---------------------------------------------------------------------- @@ -206,7 +224,7 @@ void FStatusBar::hide() //---------------------------------------------------------------------- void FStatusBar::drawMessage() { - int termWidth, space_offset; + int termWidth, space_offset; bool isLastActiveFocus, hasKeys; if ( ! (isVisible() ) ) @@ -377,14 +395,12 @@ void FStatusBar::onMouseDown (FMouseEvent* ev) while ( iter != last ) { - int x1, x2, mouse_x, mouse_y, kname_len, txt_length; - - x1 = X; - kname_len = int(getKeyName((*iter)->getKey()).getLength()); - txt_length = int((*iter)->getText().getLength()); - x2 = x1 + kname_len + txt_length + 1; - mouse_x = ev->getX(); - mouse_y = ev->getY(); + int x1 = X + , kname_len = int(getKeyName((*iter)->getKey()).getLength()) + , txt_length = int((*iter)->getText().getLength()) + , x2 = x1 + kname_len + txt_length + 1 + , mouse_x = ev->getX() + , mouse_y = ev->getY(); if ( mouse_x >= x1 && mouse_x <= x2 @@ -423,11 +439,10 @@ void FStatusBar::onMouseUp (FMouseEvent* ev) while ( iter != last ) { - int x1, x2, kname_len, txt_length; - x1 = X; - kname_len = int(getKeyName((*iter)->getKey()).getLength()); - txt_length = int((*iter)->getText().getLength()); - x2 = x1 + kname_len + txt_length + 1; + int x1 = X + , kname_len = int(getKeyName((*iter)->getKey()).getLength()) + , txt_length = int((*iter)->getText().getLength()) + , x2 = x1 + kname_len + txt_length + 1; if ( (*iter)->hasMouseFocus() ) { @@ -470,13 +485,12 @@ void FStatusBar::onMouseMove (FMouseEvent* ev) while ( iter != last ) { - int x1, x2, mouse_x, mouse_y, kname_len, txt_length; - x1 = X; - kname_len = int(getKeyName((*iter)->getKey()).getLength()); - txt_length = int((*iter)->getText().getLength()); - x2 = x1 + kname_len + txt_length + 1; - mouse_x = ev->getX(); - mouse_y = ev->getY(); + int x1 = X + , kname_len = int(getKeyName((*iter)->getKey()).getLength()) + , txt_length = int((*iter)->getText().getLength()) + , x2 = x1 + kname_len + txt_length + 1 + , mouse_x = ev->getX() + , mouse_y = ev->getY(); if ( mouse_x >= x1 && mouse_x <= x2 diff --git a/src/fstring.cpp b/src/fstring.cpp index 8524c02b..e7d904a3 100644 --- a/src/fstring.cpp +++ b/src/fstring.cpp @@ -1,5 +1,23 @@ -// File: fstring.cpp -// Provides: class FString +/************************************************************************ +* fstring.cpp - Unicode string class with UTF-8 support * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -953,7 +971,7 @@ uLong FString::toULong() const throw std::overflow_error ("overflow"); } - num = (num<<3)+(num<<1) + d; // (10 * num) + d + num = (num << 3) + (num << 1) + d; // (10 * num) + d p++; } @@ -2579,7 +2597,9 @@ inline void FString::_remove (uInt pos, uInt len) //---------------------------------------------------------------------- inline char* FString::wc_to_c_str (const wchar_t* s) const { - int mblength, size, dest_size; + int mblength + , size + , dest_size; const wchar_t* src; if ( ! s ) // handle NULL string @@ -2638,7 +2658,9 @@ inline char* FString::wc_to_c_str (const wchar_t* s) const //---------------------------------------------------------------------- inline wchar_t* FString::c_to_wc_str (const char* s) const { - int wclength, size, dest_size; + int wclength + , size + , dest_size; const char* src; wchar_t* dest; diff --git a/src/fswitch.cpp b/src/fswitch.cpp index 5a50bd06..b6030167 100644 --- a/src/fswitch.cpp +++ b/src/fswitch.cpp @@ -1,5 +1,23 @@ -// File: fswitch.cpp -// Provides: class FSwitch +/************************************************************************ +* fswitch.cpp - Widget FSwitch * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fswitch.h" diff --git a/src/fterm.cpp b/src/fterm.cpp index 08a38752..3f07de93 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -1,5 +1,23 @@ -// File: fterm.cpp -// Provides: class FTerm +/************************************************************************ +* fterm.cpp - Base class for terminal detection and control * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2012-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -213,7 +231,7 @@ FTerm::modifier_key& FTerm::getLinuxModifierKey() // fill bit field with 0 std::memset (&mod_key, 0x00, sizeof(mod_key)); - // TIOCLINUX, subcode=6 + // TIOCLINUX, subcode = 6 if ( ioctl(0, TIOCLINUX, &subcode) >= 0 ) { if ( subcode & (1 << KG_SHIFT) ) @@ -1325,12 +1343,11 @@ void FTerm::setPalette (short index, int r, int g, int b) if ( Ic || Ip ) { - int rr, gg, bb; const char* color_str = ""; - rr = (r * 1001) / 256; - gg = (g * 1001) / 256; - bb = (b * 1001) / 256; + int rr = (r * 1001) / 256 + , gg = (g * 1001) / 256 + , bb = (b * 1001) / 256; if ( Ic ) color_str = tparm(Ic, index, rr, gg, bb, 0, 0, 0, 0, 0); @@ -1521,7 +1538,9 @@ const FString FTerm::getSecDA() { FString sec_da_str = ""; - int a=0, b=0, c=0; + int a = 0 + , b = 0 + , c = 0; fd_set ifds; struct timeval tv; @@ -2032,18 +2051,15 @@ int FTerm::getFramebuffer_bpp () return -1; } - if (fd >= 0) + if ( ! ioctl(fd, FBIOGET_VSCREENINFO, &fb_var) + && ! ioctl(fd, FBIOGET_FSCREENINFO, &fb_fix) ) { - if ( ! ioctl(fd, FBIOGET_VSCREENINFO, &fb_var) - && ! ioctl(fd, FBIOGET_FSCREENINFO, &fb_fix) ) - { - ::close(fd); - return int(fb_var.bits_per_pixel); - } - else - { - ::close(fd); - } + ::close(fd); + return int(fb_var.bits_per_pixel); + } + else + { + ::close(fd); } return -1; @@ -2272,7 +2288,7 @@ int FTerm::setScreenFont ( uChar* fontdata, uInt count } for (uInt i = 0; i < count; i++) - std::memcpy ( const_cast(font.data + bytes_per_line*32*i) + std::memcpy ( const_cast(font.data + bytes_per_line * 32 * i) , &fontdata[i * font.height] , font.height); } @@ -3004,11 +3020,12 @@ void FTerm::init_termcaps() * captoinfo - convert all termcap descriptions into terminfo descriptions * infocmp - print out terminfo description from the current terminal */ - static const int success = 1; - static const int no_entry = 0; - static const int db_not_found = -1; - static const int not_available = -1; - static const int uninitialized = -2; + static const int + success = 1 + , no_entry = 0 + , db_not_found = -1 + , not_available = -1 + , uninitialized = -2; static char term_buffer[2048]; static char string_buf[2048]; char* buffer = string_buf; @@ -3976,7 +3993,7 @@ void FTerm::init() setPalette (fc::Black, 0x00, 0x00, 0x00); setPalette (fc::Blue, 0x22, 0x22, 0xb2); - setPalette (fc::Green, 0x18, 0xb2, 0x18); + setPalette (fc::Green, 0x18, 0x78, 0x18); setPalette (fc::Cyan, 0x4a, 0x4a, 0xe4); setPalette (fc::Red, 0xb2, 0x18, 0x18); setPalette (fc::Magenta, 0xb2, 0x18, 0xb2); diff --git a/src/ftermbuffer.cpp b/src/ftermbuffer.cpp index 010ef7c8..4fa56e20 100644 --- a/src/ftermbuffer.cpp +++ b/src/ftermbuffer.cpp @@ -1,5 +1,23 @@ -// File: ftermbuffer.cpp -// Provides: class FTermBuffer +/************************************************************************ +* ftermbuffer.cpp - Buffer for virtual terminal strings * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include diff --git a/src/ftextview.cpp b/src/ftextview.cpp index b6185d4f..0d6f0bf8 100644 --- a/src/ftextview.cpp +++ b/src/ftextview.cpp @@ -1,5 +1,23 @@ -// File: ftextview.cpp -// Provides: class FTextView +/************************************************************************ +* ftextview.cpp - Widget FTextView (a multiline text viewer) * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fdialog.h" #include "final/fstatusbar.h" @@ -427,9 +445,12 @@ void FTextView::onMouseDown (FMouseEvent* ev) parent = getParentWidget(); - if ( parent - && parent->isDialogWidget() - && (dialog = static_cast(parent)) != 0 + if ( ! parent ) + return; + + dialog = static_cast(parent); + + if ( parent->isDialogWidget() && dialog->isResizeable() && ! dialog->isZoomed() ) { @@ -455,28 +476,28 @@ void FTextView::onMouseDown (FMouseEvent* ev) void FTextView::onMouseUp (FMouseEvent* ev) { FWidget* parent = getParentWidget(); - FDialog* dialog; - if ( parent - && parent->isDialogWidget() - && (dialog = static_cast(parent)) != 0 - && dialog->isResizeable() - && ! dialog->isZoomed() ) + if ( parent && parent->isDialogWidget() ) { - int b = ev->getButton(); - const FPoint& tp = ev->getTermPos(); - const FPoint& p = parent->termToWidgetPos(tp); - parent->setFocus(); + FDialog* dialog = static_cast(parent); - try + if ( dialog->isResizeable() && ! dialog->isZoomed() ) { - FMouseEvent* _ev = new FMouseEvent (fc::MouseUp_Event, p, tp, b); - FApplication::sendEvent (parent, _ev); - delete _ev; - } - catch (const std::bad_alloc& ex) - { - std::cerr << "not enough memory to alloc " << ex.what() << std::endl; + int b = ev->getButton(); + const FPoint& tp = ev->getTermPos(); + const FPoint& p = parent->termToWidgetPos(tp); + parent->setFocus(); + + try + { + FMouseEvent* _ev = new FMouseEvent (fc::MouseUp_Event, p, tp, b); + FApplication::sendEvent (parent, _ev); + delete _ev; + } + catch (const std::bad_alloc& ex) + { + std::cerr << "not enough memory to alloc " << ex.what() << std::endl; + } } } @@ -491,28 +512,28 @@ void FTextView::onMouseUp (FMouseEvent* ev) void FTextView::onMouseMove (FMouseEvent* ev) { FWidget* parent = getParentWidget(); - FDialog* dialog; - if ( parent - && parent->isDialogWidget() - && (dialog = static_cast(parent)) != 0 - && dialog->isResizeable() - && ! dialog->isZoomed() ) + if ( parent && parent->isDialogWidget() ) { - int b = ev->getButton(); - const FPoint& tp = ev->getTermPos(); - const FPoint& p = parent->termToWidgetPos(tp); - parent->setFocus(); + FDialog* dialog = static_cast(parent); - try + if ( dialog->isResizeable() && ! dialog->isZoomed() ) { - FMouseEvent* _ev = new FMouseEvent (fc::MouseMove_Event, p, tp, b); - FApplication::sendEvent (parent, _ev); - delete _ev; - } - catch (const std::bad_alloc& ex) - { - std::cerr << "not enough memory to alloc " << ex.what() << std::endl; + int b = ev->getButton(); + const FPoint& tp = ev->getTermPos(); + const FPoint& p = parent->termToWidgetPos(tp); + parent->setFocus(); + + try + { + FMouseEvent* _ev = new FMouseEvent (fc::MouseMove_Event, p, tp, b); + FApplication::sendEvent (parent, _ev); + delete _ev; + } + catch (const std::bad_alloc& ex) + { + std::cerr << "not enough memory to alloc " << ex.what() << std::endl; + } } } } @@ -532,7 +553,7 @@ void FTextView::onWheel (FWheelEvent* ev) yoffset -= 4; if ( yoffset < 0 ) - yoffset=0; + yoffset = 0; break; @@ -596,10 +617,10 @@ void FTextView::onFocusOut (FFocusEvent*) void FTextView::adjustSize() { FWidget::adjustSize(); - int width = getWidth(); - int height = getHeight(); - int last_line = int(getRows()); - int max_width = int(maxLineWidth); + int width = getWidth() + , height = getHeight() + , last_line = int(getRows()) + , max_width = int(maxLineWidth); if ( xoffset >= max_width - width - nf_offset ) xoffset = max_width - width - nf_offset - 1; @@ -800,10 +821,10 @@ void FTextView::processChanged() void FTextView::cb_VBarChange (FWidget*, data_ptr) { FScrollbar::sType scrollType; - int distance = 1; - int last_line = int(getRows()); - int yoffset_before = yoffset; - int yoffset_end = last_line - getClientHeight(); + int distance = 1 + , last_line = int(getRows()) + , yoffset_before = yoffset + , yoffset_end = last_line - getClientHeight(); scrollType = vbar->getScrollType(); switch ( int(scrollType) ) @@ -891,9 +912,9 @@ void FTextView::cb_VBarChange (FWidget*, data_ptr) void FTextView::cb_HBarChange (FWidget*, data_ptr) { FScrollbar::sType scrollType; - int distance = 1; - int xoffset_before = xoffset; - int xoffset_end = int(maxLineWidth) - getClientWidth(); + int distance = 1 + , xoffset_before = xoffset + , xoffset_end = int(maxLineWidth) - getClientWidth(); scrollType = hbar->getScrollType(); switch ( scrollType ) @@ -951,7 +972,7 @@ void FTextView::cb_HBarChange (FWidget*, data_ptr) xoffset -= 4; if ( xoffset < 0 ) - xoffset=0; + xoffset = 0; break; diff --git a/src/ftogglebutton.cpp b/src/ftogglebutton.cpp index f4863e6c..9e3d4958 100644 --- a/src/ftogglebutton.cpp +++ b/src/ftogglebutton.cpp @@ -1,5 +1,23 @@ -// File: ftogglebutton.cpp -// Provides: class FToggleButton +/************************************************************************ +* ftogglebutton.cpp - Intermediate base class for a toggle button * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2014-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fbuttongroup.h" @@ -26,7 +44,7 @@ FToggleButton::FToggleButton (FWidget* parent) if ( parent && parent->isInstanceOf("FButtonGroup") ) { - setGroup( static_cast(parent) ); + setGroup(static_cast(parent)); if ( hasGroup() ) getGroup()->insert(this); // insert into button group @@ -48,7 +66,7 @@ FToggleButton::FToggleButton (const FString& txt, FWidget* parent) if ( parent && parent->isInstanceOf("FButtonGroup") ) { - setGroup( static_cast(parent) ); + setGroup(static_cast(parent)); if ( hasGroup() ) getGroup()->insert(this); // insert into button group diff --git a/src/ftooltip.cpp b/src/ftooltip.cpp index a1d57d1f..f6efad6d 100644 --- a/src/ftooltip.cpp +++ b/src/ftooltip.cpp @@ -1,5 +1,23 @@ -// File: ftooltip.cpp -// Provides: class FToolTip +/************************************************************************ +* ftooltip.cpp - Widget FToolTip * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/ftooltip.h" diff --git a/src/fvterm.cpp b/src/fvterm.cpp index 8cf29b29..fd9a2e9c 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -1,5 +1,23 @@ -// File: fvterm.cpp -// Provides: class FVTerm +/************************************************************************ +* fvterm.cpp - Virtual terminal implementation * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2016-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include #include @@ -330,6 +348,7 @@ int FVTerm::printf (const char* format, ...) std::cerr << "not enough memory to alloc " << ex.what() << std::endl; return -1; } + va_start (args, format); vsnprintf (buffer, uLong(len + 1), format, args); va_end (args); @@ -1294,7 +1313,6 @@ void FVTerm::updateVTerm (term_area* area) { // Update area data on VTerm - int ax, ay, aw, ah, rsh, bsh, y_end, ol; char_data* tc; // terminal character char_data* ac; // area character @@ -1320,13 +1338,14 @@ void FVTerm::updateVTerm (term_area* area) } } - ax = area->offset_left; - ay = area->offset_top; - aw = area->width; - ah = area->height; - rsh = area->right_shadow; - bsh = area->bottom_shadow; - ol = 0; // outside left + int ax = area->offset_left + , ay = area->offset_top + , aw = area->width + , ah = area->height + , rsh = area->right_shadow + , bsh = area->bottom_shadow + , ol = 0 // outside left + , y_end; if ( ax < 0 ) { @@ -1360,16 +1379,15 @@ void FVTerm::updateVTerm (term_area* area) for (int x = line_xmin; x <= line_xmax; x++) // column loop { - int gx, gy, line_len; covered_state is_covered; // global terminal positions - gx = ax + x; - gy = ay + y; + int gx = ax + x + , gy = ay + y; if ( gx < 0 || gy < 0 ) continue; - line_len = aw + rsh; + int line_len = aw + rsh; ac = &area->text[y * line_len + x]; tc = &vterm->text[gy * vterm->width + gx - ol]; @@ -1525,11 +1543,11 @@ bool FVTerm::updateVTermCursor (term_area* area) bool FVTerm::isInsideArea (int x, int y, term_area* area) { // Check whether the coordinates are within the area - int ax, ay, aw, ah; - ax = 0; - ay = 0; - aw = area->width; - ah = area->height; + + int ax = 0 + , ay = 0 + , aw = area->width + , ah = area->height; FRect area_geometry(ax, ay, aw, ah); if ( area_geometry.contains(x, y) ) @@ -1618,13 +1636,14 @@ void FVTerm::getArea (const FRect& box, term_area* area) void FVTerm::getArea (int x, int y, int w, int h, term_area* area) { // Copies a block from the virtual terminal rectangle to the given area - int y_end, length, dx, dy; if ( ! area ) return; - dx = x - area->offset_left + 1; - dy = y - area->offset_top + 1; + int dx = x - area->offset_left + 1 + , dy = y - area->offset_top + 1 + , y_end + , length; if ( x < 0 || y < 0 ) return; @@ -1676,7 +1695,7 @@ void FVTerm::putArea (const FPoint& pos, term_area* area) void FVTerm::putArea (int ax, int ay, term_area* area) { // Copies the given area block to the virtual terminal position - int aw, ah, rsh, bsh, y_end, length, ol; + char_data* tc; // terminal character char_data* ac; // area character @@ -1688,11 +1707,14 @@ void FVTerm::putArea (int ax, int ay, term_area* area) ax--; ay--; - aw = area->width; - ah = area->height; - rsh = area->right_shadow; - bsh = area->bottom_shadow; - ol = 0; // outside left + + int aw = area->width + , ah = area->height + , rsh = area->right_shadow + , bsh = area->bottom_shadow + , ol = 0 // outside left + , y_end + , length; if ( ax < 0 ) { @@ -1788,9 +1810,9 @@ void FVTerm::putArea (int ax, int ay, term_area* area) void FVTerm::scrollAreaForward (term_area* area) { // Scrolls the entire area up line down - int total_width; - int length; - int y_max; + int total_width + , length + , y_max; char_data nc; // next character char_data* lc; // last character char_data* dc; // destination character @@ -1849,9 +1871,9 @@ void FVTerm::scrollAreaForward (term_area* area) void FVTerm::scrollAreaReverse (term_area* area) { // Scrolls the entire area one line down - int total_width; - int length; - int y_max; + int total_width + , length + , y_max; char_data nc; // next character char_data* lc; // last character char_data* dc; // destination character diff --git a/src/fwidget.cpp b/src/fwidget.cpp index df58ea4c..b3d892e0 100644 --- a/src/fwidget.cpp +++ b/src/fwidget.cpp @@ -1,5 +1,23 @@ -// File: fwidget.cpp -// Provides: class FWidget +/************************************************************************ +* fwidget.cpp - Intermediate base class for all widget objects * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include @@ -664,7 +682,8 @@ void FWidget::setGeometry (int x, int y, int w, int h, bool adjust) { // Sets the geometry of the widget relative to its parent - int term_x, term_y; + int term_x + , term_y; w = std::min (w, size_hints.max_width); w = std::max (w, size_hints.min_width); @@ -1384,7 +1403,6 @@ void FWidget::move (int dx, int dy) //---------------------------------------------------------------------- void FWidget::drawShadow() { - int x1, x2, y1, y2; bool trans_shadow = ((flags & fc::trans_shadow) != 0); if ( isMonochron() && ! trans_shadow ) @@ -1397,10 +1415,10 @@ void FWidget::drawShadow() return; } - x1 = 1; - x2 = getWidth(); - y1 = 1; - y2 = getHeight(); + int x1 = 1 + , x2 = getWidth() + , y1 = 1 + , y2 = getHeight(); if ( trans_shadow ) { @@ -1482,15 +1500,13 @@ void FWidget::drawShadow() //---------------------------------------------------------------------- void FWidget::clearShadow() { - int x1, x2, y1, y2; - if ( isMonochron() ) return; - x1 = 1; - x2 = getWidth(); - y1 = 1; - y2 = getHeight(); + int x1 = 1 + , x2 = getWidth() + , y1 = 1 + , y2 = getHeight(); if ( isWindowWidget() ) { @@ -1524,15 +1540,13 @@ void FWidget::clearShadow() //---------------------------------------------------------------------- void FWidget::drawFlatBorder() { - int x1, x2, y1, y2; - if ( ! isNewFont() ) return; - x1 = 1; - x2 = getWidth() + 1; - y1 = 0; - y2 = getHeight() + 1; + int x1 = 1 + , x2 = getWidth() + 1 + , y1 = 0 + , y2 = getHeight() + 1; if ( FWidget* p = getParentWidget() ) setColor (wc.dialog_fg, p->getBackgroundColor()); @@ -1593,15 +1607,13 @@ void FWidget::drawFlatBorder() //---------------------------------------------------------------------- void FWidget::clearFlatBorder() { - int x1, x2, y1, y2; - if ( ! isNewFont() ) return; - x1 = 1; - x2 = getWidth() + 1; - y1 = 0; - y2 = getHeight() + 1; + int x1 = 1 + , x2 = getWidth() + 1 + , y1 = 0 + , y2 = getHeight() + 1; if ( FWidget* p = getParentWidget() ) setColor (wc.dialog_fg, p->getBackgroundColor()); @@ -1751,7 +1763,7 @@ void FWidget::setStatusBar (FStatusBar* sbar) if ( ! sbar || statusbar == sbar ) return; - if ( statusbar && sbar != 0 ) + if ( statusbar ) delete statusbar; statusbar = sbar; diff --git a/src/fwindow.cpp b/src/fwindow.cpp index 62e6f3d9..baa6a99b 100644 --- a/src/fwindow.cpp +++ b/src/fwindow.cpp @@ -1,5 +1,23 @@ -// File: fwindow.cpp -// Provides: class FWindow +/************************************************************************ +* fwindow.cpp - Intermediate base class for all window objects * +* * +* This file is part of the Final Cut widget toolkit * +* * +* Copyright 2015-2017 Markus Gans * +* * +* The Final Cut is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* The Final Cut is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +************************************************************************/ #include "final/fapplication.h" #include "final/fmenubar.h" @@ -255,10 +273,10 @@ void FWindow::drawBorder() { if ( isNewFont() ) { - int x1 = 1; - int x2 = 1 + getWidth() - 1; - int y1 = 1; - int y2 = 1 + getHeight() - 1; + int x1 = 1 + , x2 = 1 + getWidth() - 1 + , y1 = 1 + , y2 = 1 + getHeight() - 1; setPrintPos (x1, y1); print (fc::NF_border_corner_upper_left); // ⎡ @@ -398,10 +416,10 @@ void FWindow::setGeometry (int x, int y, int w, int h, bool adjust) { // Sets the geometry of the widget - int old_x = getX(); - int old_y = getY(); - int old_width = getWidth(); - int old_height = getHeight(); + int old_x = getX() + , old_y = getY() + , old_width = getWidth() + , old_height = getHeight(); if ( y < 1 ) y = 1; @@ -772,12 +790,13 @@ bool FWindow::activatePrevWindow() //---------------------------------------------------------------------- void FWindow::setShadowSize (int right, int bottom) { - int old_right, old_bottom, new_right, new_bottom; - old_right = getShadow().getX(); - old_bottom = getShadow().getY(); + int old_right = getShadow().getX() + , old_bottom = getShadow().getY(); + FWidget::setShadowSize (right, bottom); - new_right = getShadow().getX(); - new_bottom = getShadow().getY(); + + int new_right = getShadow().getX() + , new_bottom = getShadow().getY(); if ( isVirtualWindow() && (new_right != old_right || new_bottom != old_bottom) )