mouse support for coordinates > 255 and copyright informations

This commit is contained in:
Markus Gans 2017-10-02 07:32:33 +02:00
parent b9f6a6bee6
commit 975212bac0
105 changed files with 3796 additions and 1782 deletions

View File

@ -1,3 +1,8 @@
2017-10-02 Markus Gans <guru.mail@muenster.de>
* 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 <guru.mail@muenster.de> 2017-09-21 Markus Gans <guru.mail@muenster.de>
* New data type FStringList introduced * New data type FStringList introduced
* Stream and assignment operator support for FLineEdit * Stream and assignment operator support for FLineEdit

View File

@ -1,8 +1,23 @@
// File: calculator.cpp /************************************************************************
* calculator.cpp - A simple calculator with trigonometric functions *
//---------------------------------------------------------------------- * *
// 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <cfloat> #include <cfloat>
#include <cmath> #include <cmath>
@ -17,6 +32,7 @@
const lDouble PI = 3.141592653589793238L; const lDouble PI = 3.141592653589793238L;
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class Button // class Button
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -96,7 +112,7 @@ class Calc : public FDialog
{ {
public: public:
// Constructor // Constructor
explicit Calc (FWidget* parent=0); explicit Calc (FWidget* parent = 0);
// Destructor // Destructor
~Calc(); ~Calc();

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fbutton.h> #include <final/fbutton.h>
@ -119,7 +138,7 @@ int main (int argc, char* argv[])
dgl->show(); dgl->show();
// Get the checked radio button text // 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) ) if ( checkButtonGroup->isChecked(n) )
{ {

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fbutton.h> #include <final/fbutton.h>
@ -8,6 +27,7 @@
// function prototype // function prototype
void cb_quit (FWidget*, FWidget::data_ptr); void cb_quit (FWidget*, FWidget::data_ptr);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// callback function // callback function
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -17,6 +37,7 @@ void cb_quit (FWidget*, FWidget::data_ptr data)
app->quit(); app->quit();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// main part // main part
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fmessagebox.h> #include <final/fmessagebox.h>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fbutton.h> #include <final/fbutton.h>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/final.h> #include <final/final.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class keyboard // class Keyboard
//---------------------------------------------------------------------- //----------------------------------------------------------------------
class keyboard : public FWidget class Keyboard : public FWidget
{ {
public: public:
// Constructor // Constructor
explicit keyboard (FWidget* = 0); explicit Keyboard (FWidget* = 0);
protected: protected:
// Event handlers // Event handlers
@ -21,7 +40,7 @@ class keyboard : public FWidget
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------
keyboard::keyboard (FWidget* parent) Keyboard::Keyboard (FWidget* parent)
: FWidget(parent) : FWidget(parent)
{ {
resetXTermForeground(); resetXTermForeground();
@ -31,7 +50,7 @@ keyboard::keyboard (FWidget* parent)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void keyboard::onKeyPress (FKeyEvent* ev) void Keyboard::onKeyPress (FKeyEvent* ev)
{ {
int key_id = ev->key(); int key_id = ev->key();
bool is_last_line = false; 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(); quit();
ev->accept(); ev->accept();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void keyboard::draw() void Keyboard::draw()
{ {
setPrintPos (1, 1); setPrintPos (1, 1);
print() << "---------------\n" print() << "---------------\n"
@ -76,7 +95,7 @@ int main (int argc, char* argv[])
app.setBackgroundColor(fc::Default); app.setBackgroundColor(fc::Default);
// Create a keyboard object // Create a keyboard object
keyboard key(&app); Keyboard key(&app);
key.addAccelerator('q'); key.addAccelerator('q');
// Set the keyboard object as main widget // Set the keyboard object as main widget

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <iostream> #include <iostream>
#include <list> #include <list>
@ -86,13 +105,13 @@ Listbox::Listbox (FWidget* parent)
list1->setGeometry(2, 1, 18, 10); list1->setGeometry(2, 1, 18, 10);
list1->setText ("FListBoxItem"); list1->setText ("FListBoxItem");
for (int i=1; i < 30; i++) for (int i = 1; i < 30; i++)
list1->insert (L"----- " + (FString() << i) + L" -----"); list1->insert (L"----- " + (FString() << i) + L" -----");
// listbox 2 // listbox 2
double_list = new std::list<double>; double_list = new std::list<double>;
for (double i=1; i<=15; i++) for (double i = 1; i<=15; i++)
double_list->push_back(2 * i + (i / 100)); double_list->push_back(2 * i + (i / 100));
FListBox* list2 = new FListBox (this); FListBox* list2 = new FListBox (this);

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fdialog.h> #include <final/fdialog.h>
#include <final/fmessagebox.h> #include <final/fmessagebox.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class Mandelbrot // class Mandelbrot
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fcheckmenuitem.h> #include <final/fcheckmenuitem.h>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fdialog.h> #include <final/fdialog.h>
@ -443,19 +462,17 @@ void MouseDraw::drawBrush (int x, int y, bool swap_color)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void MouseDraw::drawCanvas() void MouseDraw::drawCanvas()
{ {
int ax, ay, y_end, x_end;
if ( ! hasPrintArea() ) if ( ! hasPrintArea() )
FVTerm::getPrintArea(); FVTerm::getPrintArea();
if ( ! (hasPrintArea() && canvas) ) if ( ! (hasPrintArea() && canvas) )
return; return;
ax = 9 + getTermX() - print_area->offset_left; int ax = 9 + getTermX() - print_area->offset_left
ay = 1 + getTermY() - print_area->offset_top; , ay = 1 + getTermY() - print_area->offset_top
y_end = canvas->height; , y_end = canvas->height
x_end = canvas->width; , x_end = canvas->width
int w_line_len = print_area->width + print_area->right_shadow; , w_line_len = print_area->width + print_area->right_shadow;
for (int y = 0; y < y_end; y++) // line loop for (int y = 0; y < y_end; y++) // line loop
{ {
@ -478,10 +495,10 @@ void MouseDraw::drawCanvas()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void MouseDraw::adjustSize() void MouseDraw::adjustSize()
{ {
int w = 60; int w = 60
int h = 18; , h = 18
int x = 1 + (getParentWidget()->getWidth() - w) / 2; , x = 1 + (getParentWidget()->getWidth() - w) / 2
int y = 1 + (getParentWidget()->getHeight() - h) / 2; , y = 1 + (getParentWidget()->getHeight() - h) / 2;
setGeometry (x, y, w, h, false); setGeometry (x, y, w, h, false);
FDialog::adjustSize(); FDialog::adjustSize();
} }

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <iomanip> #include <iomanip>
#include <string> #include <string>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fbutton.h> #include <final/fbutton.h>
@ -7,30 +26,31 @@
#include <final/fmessagebox.h> #include <final/fmessagebox.h>
#include <final/fscrollview.h> #include <final/fscrollview.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class scrollview // class Scrollview
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push) #pragma pack(push)
#pragma pack(1) #pragma pack(1)
class scrollview : public FScrollView class Scrollview : public FScrollView
{ {
public: public:
// Constructor // Constructor
explicit scrollview (FWidget* = 0); explicit Scrollview (FWidget* = 0);
// Destructor // Destructor
~scrollview (); ~Scrollview ();
// Mutator // Mutator
void setScrollSize (int, int); void setScrollSize (int, int);
private: private:
// Disable copy constructor // Disable copy constructor
scrollview (const scrollview&); Scrollview (const Scrollview&);
// Disable assignment operator (=) // Disable assignment operator (=)
scrollview& operator = (const scrollview&); Scrollview& operator = (const Scrollview&);
// Method // Method
void draw(); void draw();
@ -50,7 +70,7 @@ class scrollview : public FScrollView
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
scrollview::scrollview (FWidget* parent) Scrollview::Scrollview (FWidget* parent)
: FScrollView(parent) : FScrollView(parent)
, go_east() , go_east()
, go_south() , go_south()
@ -74,34 +94,34 @@ scrollview::scrollview (FWidget* parent)
go_east->addCallback go_east->addCallback
( (
"clicked", "clicked",
F_METHOD_CALLBACK (this, &scrollview::cb_go_east) F_METHOD_CALLBACK (this, &Scrollview::cb_go_east)
); );
go_south->addCallback go_south->addCallback
( (
"clicked", "clicked",
F_METHOD_CALLBACK (this, &scrollview::cb_go_south) F_METHOD_CALLBACK (this, &Scrollview::cb_go_south)
); );
go_west->addCallback go_west->addCallback
( (
"clicked", "clicked",
F_METHOD_CALLBACK (this, &scrollview::cb_go_west) F_METHOD_CALLBACK (this, &Scrollview::cb_go_west)
); );
go_north->addCallback go_north->addCallback
( (
"clicked", "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); FScrollView::setScrollSize (width, height);
go_south->setPos (width - 5, 1); 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() ) if ( isMonochron() )
setReverse(true); 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); scrollToX (getScrollWidth() - getViewportWidth() + 1);
go_south->setFocus(); 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); scrollToY (getScrollHeight() - getViewportHeight() + 1);
go_west->setFocus(); 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); scrollToX (1);
go_north->setFocus(); 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); scrollToY (1);
go_east->setFocus(); go_east->setFocus();
@ -170,20 +190,20 @@ void scrollview::cb_go_north (FWidget*, data_ptr)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class scrollviewdemo // class Scrollviewdemo
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push) #pragma pack(push)
#pragma pack(1) #pragma pack(1)
class scrollviewdemo : public FDialog class Scrollviewdemo : public FDialog
{ {
public: public:
// Constructor // Constructor
explicit scrollviewdemo (FWidget* = 0); explicit Scrollviewdemo (FWidget* = 0);
// Destructor // Destructor
~scrollviewdemo (); ~Scrollviewdemo ();
// Event handler // Event handler
void onClose (FCloseEvent*); void onClose (FCloseEvent*);
@ -195,14 +215,14 @@ class scrollviewdemo : public FDialog
//---------------------------------------------------------------------- //----------------------------------------------------------------------
scrollviewdemo::scrollviewdemo (FWidget* parent) Scrollviewdemo::Scrollviewdemo (FWidget* parent)
: FDialog(parent) : FDialog(parent)
{ {
setGeometry (16, 3, 50, 19); setGeometry (16, 3, 50, 19);
setText ("Scrolling viewport example"); setText ("Scrolling viewport example");
// The scrolling viewport widget // The scrolling viewport widget
scrollview* sview = new scrollview (this); Scrollview* sview = new Scrollview (this);
sview->setGeometry(3, 2, 44, 12); sview->setGeometry(3, 2, 44, 12);
sview->setScrollSize(188, 124); sview->setScrollSize(188, 124);
@ -214,7 +234,7 @@ scrollviewdemo::scrollviewdemo (FWidget* parent)
button->addCallback button->addCallback
( (
"clicked", "clicked",
F_METHOD_CALLBACK (this, &scrollviewdemo::cb_quit) F_METHOD_CALLBACK (this, &Scrollviewdemo::cb_quit)
); );
// Text label // 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(); close();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void scrollviewdemo::onClose (FCloseEvent* ev) void Scrollviewdemo::onClose (FCloseEvent* ev)
{ {
int ret = FMessageBox::info ( this, "Quit" int ret = FMessageBox::info ( this, "Quit"
, "Do you really want\n" , "Do you really want\n"
@ -259,7 +279,7 @@ int main (int argc, char* argv[])
FApplication app(argc, argv); FApplication app(argc, argv);
// Create a simple dialog box // Create a simple dialog box
scrollviewdemo svdemo(&app); Scrollviewdemo svdemo(&app);
// Set dialog main_dlg as main widget // Set dialog main_dlg as main widget
app.setMainWidget(&svdemo); app.setMainWidget(&svdemo);

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <langinfo.h> #include <langinfo.h>
#include <term.h> #include <term.h>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fbutton.h> #include <final/fbutton.h>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/final.h> #include <final/final.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class timer // class Timer
//---------------------------------------------------------------------- //----------------------------------------------------------------------
class timer : public FWidget class Timer : public FWidget
{ {
public: public:
// Constructor // Constructor
explicit timer (FWidget* = 0); explicit Timer (FWidget* = 0);
protected: protected:
// Method // Method
@ -22,7 +42,7 @@ class timer : public FWidget
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------
timer::timer (FWidget* parent) Timer::Timer (FWidget* parent)
: FWidget(parent) : FWidget(parent)
{ {
addTimer (60000); // 1-minute timer addTimer (60000); // 1-minute timer
@ -38,7 +58,7 @@ timer::timer (FWidget* parent)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void timer::draw() void Timer::draw()
{ {
setPrintPos (1,1); setPrintPos (1,1);
print() << "---------------\n" print() << "---------------\n"
@ -48,7 +68,7 @@ void timer::draw()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void timer::onTimer (FTimerEvent* ev) void Timer::onTimer (FTimerEvent* ev)
{ {
bool is_last_line = false; bool is_last_line = false;
int timer_id = ev->timerId(); 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(); quit();
ev->accept(); ev->accept();
@ -84,7 +104,7 @@ int main (int argc, char* argv[])
app.setBackgroundColor(fc::Default); app.setBackgroundColor(fc::Default);
// Create a timer object t // Create a timer object t
timer t(&app); Timer t(&app);
t.addAccelerator('q'); t.addAccelerator('q');
// Set the timer object t as main widget // Set the timer object t as main widget

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fdialog.h> #include <final/fdialog.h>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <ctime> #include <ctime>
@ -8,6 +27,7 @@
#include <final/fmessagebox.h> #include <final/fmessagebox.h>
#include <final/fswitch.h> #include <final/fswitch.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class Watch // class Watch
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <vector> #include <vector>
@ -12,28 +31,29 @@
#include <final/fstatusbar.h> #include <final/fstatusbar.h>
#include <final/fstring.h> #include <final/fstring.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class smallWindow // class SmallWindow
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push) #pragma pack(push)
#pragma pack(1) #pragma pack(1)
class smallWindow : public FDialog class SmallWindow : public FDialog
{ {
public: public:
// Constructor // Constructor
explicit smallWindow (FWidget* = 0); explicit SmallWindow (FWidget* = 0);
// Destructor // Destructor
~smallWindow(); ~SmallWindow();
private: private:
// Disable copy constructor // Disable copy constructor
smallWindow (const smallWindow&); SmallWindow (const SmallWindow&);
// Disable assignment operator (=) // Disable assignment operator (=)
smallWindow& operator = (const smallWindow&); SmallWindow& operator = (const SmallWindow&);
// Method // Method
void adjustSize(); void adjustSize();
@ -52,7 +72,7 @@ class smallWindow : public FDialog
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
smallWindow::smallWindow (FWidget* parent) SmallWindow::SmallWindow (FWidget* parent)
: FDialog(parent) : FDialog(parent)
, left_arrow() , left_arrow()
, right_arrow() , right_arrow()
@ -101,13 +121,13 @@ smallWindow::smallWindow (FWidget* parent)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
smallWindow::~smallWindow() SmallWindow::~SmallWindow()
{ {
delOwnTimer(); delOwnTimer();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void smallWindow::adjustSize() void SmallWindow::adjustSize()
{ {
if ( isZoomed() ) if ( isZoomed() )
{ {
@ -127,13 +147,13 @@ void smallWindow::adjustSize()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void smallWindow::onShow (FShowEvent*) void SmallWindow::onShow (FShowEvent*)
{ {
addTimer(1000); addTimer(1000);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void smallWindow::onTimer (FTimerEvent*) void SmallWindow::onTimer (FTimerEvent*)
{ {
left_arrow->unsetEmphasis(); left_arrow->unsetEmphasis();
left_arrow->redraw(); left_arrow->redraw();
@ -355,16 +375,15 @@ void Window::activateWindow (FDialog* win)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void Window::adjustSize() void Window::adjustSize()
{ {
int w, h, X, Y, dx, dy;
std::vector<win_data*>::const_iterator iter, first; std::vector<win_data*>::const_iterator iter, first;
w = getRootWidget()->getWidth(); int w = getRootWidget()->getWidth()
h = getRootWidget()->getHeight(); , h = getRootWidget()->getHeight()
X = int(1 + (w - 40) / 2); , X = int(1 + (w - 40) / 2)
Y = int(1 + (h - 22) / 2); , Y = int(1 + (h - 22) / 2)
dx = ( w > 80 ) ? (w - 80) / 2 : 0; , dx = ( w > 80 ) ? (w - 80) / 2 : 0
dy = ( h > 24 ) ? (h - 24) / 2 : 0; , dy = ( h > 24 ) ? (h - 24) / 2 : 0;
if ( Y < 2) if ( Y < 2 )
Y = 2; Y = 2;
setPos (X, Y); setPos (X, Y);
@ -374,10 +393,9 @@ void Window::adjustSize()
{ {
if ( (*iter)->is_open ) if ( (*iter)->is_open )
{ {
int x, y, n; int n = int(std::distance(first, iter))
n = int(std::distance(first, iter)); , x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3
x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3; , y = dy + 11 + int(n / 3) * 3;
y = dy + 11 + int(n / 3) * 3;
(*iter)->dgl->setPos (x, y); (*iter)->dgl->setPos (x, y);
} }
@ -407,27 +425,25 @@ void Window::onClose (FCloseEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void Window::cb_createWindows (FWidget*, data_ptr) void Window::cb_createWindows (FWidget*, data_ptr)
{ {
int w, h, dx, dy;
std::vector<win_data*>::const_iterator iter, first; std::vector<win_data*>::const_iterator iter, first;
iter = first = windows.begin(); iter = first = windows.begin();
w = getRootWidget()->getWidth(); int w = getRootWidget()->getWidth()
h = getRootWidget()->getHeight(); , h = getRootWidget()->getHeight()
dx = ( w > 80 ) ? (w - 80) / 2 : 0; , dx = ( w > 80 ) ? (w - 80) / 2 : 0
dy = ( h > 24 ) ? (h - 24) / 2 : 0; , dy = ( h > 24 ) ? (h - 24) / 2 : 0;
while ( iter != windows.end() ) while ( iter != windows.end() )
{ {
if ( ! (*iter)->is_open ) if ( ! (*iter)->is_open )
{ {
int x, y, n;
win_data* win_dat = *iter; win_data* win_dat = *iter;
FDialog* win = new smallWindow(this); FDialog* win = new SmallWindow(this);
win_dat->dgl = win; win_dat->dgl = win;
win_dat->is_open = true; win_dat->is_open = true;
win->setText(*(win_dat)->title); win->setText(*(win_dat)->title);
n = int(std::distance(first, iter)); int n = int(std::distance(first, iter))
x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3; , x = dx + 5 + (n % 3) * 25 + int(n / 3) * 3
y = dy + 11 + int(n / 3) * 3; , y = dy + 11 + int(n / 3) * 3;
win->setGeometry (x, y, 20, 8); win->setGeometry (x, y, 20, 8);
win->setMinimumSize (20, 8); win->setMinimumSize (20, 8);
win->setResizeable(); win->setResizeable();

View File

@ -1,37 +1,56 @@
// File: fapplication.h /************************************************************************
// Provides: class FApplication * fapplication.h - Manages the application events *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2013-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ *
// ▕ FApplication ▏-┬- - - -▕ FEvent ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▏ * FObject FTerm
// : *
// : *▕▔▔▔▔▔▔▔▔▏ *
// :- - - -▕ FPoint ▏ *
// : ▕▁▁▁▁▁▁▁▁▏ *
// : *
// : *▕▔▔▔▔▔▔▔▔▔▏ *
// └- - - -▕ FWidget ▏ * FVTerm
// ▕▁▁▁▁▁▁▁▁▁▏ *
*
*
*
* FWidget
*
*
*
* 1 *
* FApplication -- - - - FEvent
* :
* :
* : *
* :- - - - FPoint
* :
* :
* : *
* - - - - FWidget
*
*/
#ifndef FAPPLICATION_H #ifndef FAPPLICATION_H
#define FAPPLICATION_H #define FAPPLICATION_H

View File

@ -1,29 +1,48 @@
// File: fbutton.h /************************************************************************
// Provides: class FButton * fbutton.h - Widget FButton *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2012-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FButton ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FButton
*
*/
#ifndef FBUTTON_H #ifndef FBUTTON_H
#define FBUTTON_H #define FBUTTON_H

View File

@ -1,29 +1,49 @@
// File: fbuttongroup.h /************************************************************************
// Provides: class FButtonGroup * fbuttongroup.h - The FButtonGroup widget organizes FToggleButton *
// * widgets in a group. *
// Inheritance diagram * *
// ═══════════════════ * This file is part of the Final Cut widget toolkit *
// * *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * Copyright 2014-2017 Markus Gans *
// ▕ FObject ▏ ▕ FTerm ▏ * *
// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ * 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, *
// ▕ FVTerm ▏ * 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 *
// ▕ FWidget ▏ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
// ▕▁▁▁▁▁▁▁▁▁▏ ************************************************************************/
// ▲
// │ /* Inheritance diagram
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FButtonGroup ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ *
* FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FButtonGroup
*
*/
#ifndef FBUTTONGROUP_H #ifndef FBUTTONGROUP_H
#define FBUTTONGROUP_H #define FBUTTONGROUP_H

View File

@ -1,12 +1,31 @@
// File: fc.h /************************************************************************
// Provides: class fc * fc.h - Implements global constants and enumerations *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▏ * *
// ▕ fc ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* fc
*
*/
#ifndef FC_H #ifndef FC_H
#define FC_H #define FC_H
@ -147,15 +166,15 @@ class fc
PlusMinus = 0x00b1, // ± PlusMinus = 0x00b1, // ±
Times = 0x00d7, // × Times = 0x00d7, // ×
Degree = 0x00b0, // ° Degree = 0x00b0, // °
BlackVerticalRectangle = 0x25ae, // ▮ BlackVerticalRectangle = 0x25ae, // ▮ (1)
SmallBullet = 0x00b7, // · SmallBullet = 0x00b7, // ·
BlackDiamond = 0x25c6, // ◆ BlackDiamondSuit = 0x2666, // ◆
SymbolForNewline = 0x2424, // ␤ SymbolForNewline = 0x2424, // ␤ (1)
SymbolForVerticalTab = 0x240b, // ␋ SymbolForVerticalTab = 0x240b, // ␋ (1)
SymbolForHorizontalTab = 0x2409, // ␉ SymbolForHorizontalTab = 0x2409, // ␉ (1)
SymbolForFormFeed = 0x240c, // ␌ SymbolForFormFeed = 0x240c, // ␌ (1)
SymbolForCarriageReturn = 0x240d, // ␍ SymbolForCarriageReturn = 0x240d, // ␍ (1)
SymbolForLineFeed = 0x240a, // ␊ SymbolForLineFeed = 0x240a, // ␊ (1)
MediumShade = 0x2592, // ▒ MediumShade = 0x2592, // ▒
BoxDrawingsHorizontal = 0x2500, // ─ BoxDrawingsHorizontal = 0x2500, // ─
BoxDrawingsVertical = 0x2502, // │ BoxDrawingsVertical = 0x2502, // │
@ -168,12 +187,14 @@ class fc
BoxDrawingsVerticalAndLeft = 0x2524, // ┤ BoxDrawingsVerticalAndLeft = 0x2524, // ┤
BoxDrawingsVerticalAndRight = 0x251c, // ├ BoxDrawingsVerticalAndRight = 0x251c, // ├
BoxDrawingsUpAndHorizontal = 0x2534, // ┴ BoxDrawingsUpAndHorizontal = 0x2534, // ┴
HorizontalScanLine1 = 0x23ba, // ⎺ HorizontalScanLine1 = 0x23ba, // ⎺ (1)
HorizontalScanLine3 = 0x23bb, // ⎻ HorizontalScanLine3 = 0x23bb, // ⎻ (1)
HorizontalScanLine7 = 0x23bc, // ⎼ HorizontalScanLine7 = 0x23bc, // ⎼ (1)
HorizontalScanLine9 = 0x23bd, // ⎽ HorizontalScanLine9 = 0x23bd, // ⎽ (1)
BlackUpPointingTriangle = 0x25b2, // ▲ BlackUpPointingTriangle = 0x25b2, // ▲
BlackDownPointingTriangle = 0x25bc, // ▼ BlackDownPointingTriangle = 0x25bc, // ▼
BlackRightPointingTriangle = 0x25b6, // ▶ (1)
BlackLeftPointingTriangle = 0x25c0, // ◀ (1)
BlackRightPointingPointer = 0x25ba, // ► BlackRightPointingPointer = 0x25ba, // ►
BlackLeftPointingPointer = 0x25c4, // ◄ BlackLeftPointingPointer = 0x25c4, // ◄
Bullet = 0x2022, // • Bullet = 0x2022, // •
@ -182,52 +203,56 @@ class fc
LowerHalfBlock = 0x2584, // ▄ LowerHalfBlock = 0x2584, // ▄
LeftHalfBlock = 0x258c, // ▌ LeftHalfBlock = 0x258c, // ▌
RightHalfBlock = 0x2590, // ▐ RightHalfBlock = 0x2590, // ▐
NF_rev_left_arrow2 = 0x1ab4, // ⊐ NF_rev_left_arrow2 = 0x1ab4, // ⊐ (2)
NF_rev_right_arrow2 = 0x1ab5, // ► NF_rev_right_arrow2 = 0x1ab5, // ► (2)
NF_radio_button3 = 0x1ab7, // ) NF_radio_button3 = 0x1ab7, // ) (2)
NF_rev_border_corner_upper_right = 0x1ab8, // ⎤ NF_rev_border_corner_upper_right = 0x1ab8, // ⎤ (2)
NF_rev_border_line_right = 0x1ab9, // ⎹ NF_rev_border_line_right = 0x1ab9, // ⎹ (2)
NF_rev_border_line_vertical_left = 0x1aba, // ┤ NF_rev_border_line_vertical_left = 0x1aba, // ┤ (2)
NF_rev_border_corner_lower_right = 0x1abb, // ⎦ NF_rev_border_corner_lower_right = 0x1abb, // ⎦ (2)
NF_border_line_left = 0x1abc, // ⎸ NF_border_line_left = 0x1abc, // ⎸ (2)
NF_rev_up_arrow2 = 0x1abd, //⎹◣ NF_rev_up_arrow2 = 0x1abd, //⎹◣ (2)
NF_rev_down_arrow2 = 0x1abe, //⎹◤ NF_rev_down_arrow2 = 0x1abe, //⎹◤ (2)
NF_border_corner_middle_lower_left = 0x1ac0, // └ NF_border_corner_middle_lower_left = 0x1ac0, // └ (2)
NF_rev_up_arrow1 = 0x1ac1, // ◢⎸ NF_rev_up_arrow1 = 0x1ac1, // ◢⎸ (2)
NF_rev_down_arrow1 = 0x1ac2, // ◥⎸ NF_rev_down_arrow1 = 0x1ac2, // ◥⎸ (2)
NF_border_line_vertical_right = 0x1ac3, // ├ NF_border_line_vertical_right = 0x1ac3, // ├ (2)
NF_border_line_up_and_down = 0x1ac5, // ニ NF_border_line_up_and_down = 0x1ac5, // ニ (2)
NF_shadow_box_middle = 0x1ac6, // ニ NF_shadow_box_middle = 0x1ac6, // ニ (2)
NF_shadow_box_hdd = 0x1ac7, // ニ NF_shadow_box_hdd = 0x1ac7, // ニ (2)
NF_rev_left_arrow1 = 0x1ac8, // ◄ NF_rev_left_arrow1 = 0x1ac8, // ◄ (2)
NF_rev_right_arrow1 = 0x1ac9, // ⊏ NF_rev_right_arrow1 = 0x1ac9, // ⊏ (2)
NF_rev_menu_button1 = 0x1aca, // [ NF_rev_menu_button1 = 0x1aca, // [ (2)
NF_rev_menu_button2 = 0x1acb, // - NF_rev_menu_button2 = 0x1acb, // - (2)
NF_border_corner_middle_upper_left = 0x1acc, // ┌ NF_border_corner_middle_upper_left = 0x1acc, // ┌ (2)
NF_shadow_box_cd = 0x1acd, // ニ NF_shadow_box_cd = 0x1acd, // ニ (2)
NF_shadow_box_left = 0x1ace, // [ NF_shadow_box_left = 0x1ace, // [ (2)
NF_border_corner_middle_lower_right = 0x1acf, // ┘ NF_border_corner_middle_lower_right = 0x1acf, // ┘ (2)
NF_border_corner_middle_upper_right = 0x1ad0, // ┐ NF_border_corner_middle_upper_right = 0x1ad0, // ┐ (2)
NF_shadow_box_net = 0x1ad1, // ニ NF_shadow_box_net = 0x1ad1, // ニ (2)
NF_rev_up_pointing_triangle1 = 0x1ad2, // ◢ NF_rev_up_pointing_triangle1 = 0x1ad2, // ◢ (2)
NF_border_corner_lower_left = 0x1ad3, // ⎣ NF_border_corner_lower_left = 0x1ad3, // ⎣ (2)
NF_border_line_bottom = 0x1ad4, // _ NF_border_line_bottom = 0x1ad4, // _ (2)
NF_radio_button2 = 0x1ad5, // ⁐ NF_radio_button2 = 0x1ad5, // ⁐ (2)
NF_radio_button2_checked = 0x1ad6, // ● NF_radio_button2_checked = 0x1ad6, // ● (2)
NF_rev_down_pointing_triangle1 = 0x1ad7, // ◥ NF_rev_down_pointing_triangle1 = 0x1ad7, // ◥ (2)
NF_border_line_upper = 0x1ad8, // ¯ NF_border_line_upper = 0x1ad8, // ¯ (2)
NF_radio_button1 = 0x1ad9, // ( NF_radio_button1 = 0x1ad9, // ( (2)
NF_border_corner_upper_left = 0x1ada, // ⎡ NF_border_corner_upper_left = 0x1ada, // ⎡ (2)
NF_shadow_box_checked = 0x1adc, // ✓ NF_shadow_box_checked = 0x1adc, // ✓ (2)
NF_rev_border_line_right_and_left = 0x1ae7, // || NF_rev_border_line_right_and_left = 0x1ae7, // || (2)
NF_rev_up_pointing_triangle2 = 0x1ae8, // ◣ NF_rev_up_pointing_triangle2 = 0x1ae8, // ◣ (2)
NF_rev_down_pointing_triangle2 = 0x1ae9, // ◤ NF_rev_down_pointing_triangle2 = 0x1ae9, // ◤ (2)
NF_rev_menu_button3 = 0x1af4, // ] NF_rev_menu_button3 = 0x1af4, // ] (2)
NF_shadow_box_right = 0x1af5, // ] NF_shadow_box_right = 0x1af5, // ] (2)
NF_Bullet = 0x1af9, // ● NF_Bullet = 0x1af9, // ● (2)
NF_check_mark = 0x1afb, // ✓ NF_check_mark = 0x1afb, // ✓ (2)
SquareRoot = 0x221a // √ SquareRoot = 0x221a // √
}; };
/*
* (1) Not defined in Windows Glyph List 4 (WGL4)
* (2) Only supported in use with newfont
*/
// keyboard - single keys // keyboard - single keys
enum keys enum keys

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#ifndef FCHARMAP_H #ifndef FCHARMAP_H
#define FCHARMAP_H #define FCHARMAP_H
@ -24,16 +43,16 @@ static uInt character[][fc::NUM_OF_ENCODINGS] =
{0x00b0, 'f', 0xb0, 'o'}, // ° - Degree {0x00b0, 'f', 0xb0, 'o'}, // ° - Degree
{0x2022, '`', 0x04, '*'}, // • - Bullet {0x2022, '`', 0x04, '*'}, // • - Bullet
{0x00b7, '`', 0xfa, '.'}, // · - small Bullet {0x00b7, '`', 0xfa, '.'}, // · - small Bullet
{0x25c6, '`', 0x04, '*'}, // ◆ - BlackDiamond {0x2666, '`', 0x04, '*'}, // ◆ - BlackDiamondSuit
{0x2424, 'h', ' ', ' '}, // ␤ - SymbolForNewline {0x2424, 'h', ' ', ' '}, // ␤ - SymbolForNewline (1)
{0x240b, 'i', ' ', ' '}, // ␋ - SymbolForVerticalTab {0x240b, 'i', ' ', ' '}, // ␋ - SymbolForVerticalTab (1)
{0x2409, 'b', ' ', ' '}, // ␉ - SymbolForHorizontalTab {0x2409, 'b', ' ', ' '}, // ␉ - SymbolForHorizontalTab (1)
{0x240c, 'c', ' ', ' '}, // ␌ - SymbolForFormFeed {0x240c, 'c', ' ', ' '}, // ␌ - SymbolForFormFeed (1)
{0x240d, 'd', ' ', ' '}, // ␍ - SymbolForCarriageReturn {0x240d, 'd', ' ', ' '}, // ␍ - SymbolForCarriageReturn (1)
{0x240a, 'e', ' ', ' '}, // ␊ - SymbolForLineFeed {0x240a, 'e', ' ', ' '}, // ␊ - SymbolForLineFeed (1)
{0x2592, 'a', 0xb0, '#'}, // ▒ - MediumShade {0x2592, 'a', 0xb0, '#'}, // ▒ - MediumShade
{0x2588, '0', 0xdb, '#'}, // █ - FullBlock {0x2588, '0', 0xdb, '#'}, // █ - FullBlock
{0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle {0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle (1)
{0x258c, 0 , 0xdd, ' '}, // ▌ - LeftHalfBlock {0x258c, 0 , 0xdd, ' '}, // ▌ - LeftHalfBlock
{0x2590, 0 , 0xde, ' '}, // ▐ - RightHalfBlock {0x2590, 0 , 0xde, ' '}, // ▐ - RightHalfBlock
{0x2584, 0 , 0xdc, ' '}, // ▄ - LowerHalfBlock {0x2584, 0 , 0xdc, ' '}, // ▄ - LowerHalfBlock
@ -49,61 +68,68 @@ static uInt character[][fc::NUM_OF_ENCODINGS] =
{0x2524, 'u', 0xb4, '+'}, // ┤ - BoxDrawingsVerticalAndLeft {0x2524, 'u', 0xb4, '+'}, // ┤ - BoxDrawingsVerticalAndLeft
{0x251c, 't', 0xc3, '+'}, // ├ - BoxDrawingsVerticalAndRight {0x251c, 't', 0xc3, '+'}, // ├ - BoxDrawingsVerticalAndRight
{0x2534, 'v', 0xc1, '+'}, // ┴ - BoxDrawingsUpAndHorizontal {0x2534, 'v', 0xc1, '+'}, // ┴ - BoxDrawingsUpAndHorizontal
{0x23ba, 'o', '~', '~'}, // ⎺ - HorizontalScanLine1 {0x23ba, 'o', '~', '~'}, // ⎺ - HorizontalScanLine1 (1)
{0x23bb, 'p', 0xc4, '-'}, // ⎻ - HorizontalScanLine3 {0x23bb, 'p', 0xc4, '-'}, // ⎻ - HorizontalScanLine3 (1)
{0x23bc, 'r', 0xc4, '-'}, // ⎼ - HorizontalScanLine7 {0x23bc, 'r', 0xc4, '-'}, // ⎼ - HorizontalScanLine7 (1)
{0x23bd, 's', '_', '_'}, // ⎽ - HorizontalScanLine9 {0x23bd, 's', '_', '_'}, // ⎽ - HorizontalScanLine9 (1)
{0x25b2, '-', 0x1e, '^'}, // ▲ - BlackUpPointingTriangle {0x25b2, '-', 0x1e, '^'}, // ▲ - BlackUpPointingTriangle
{0x25bc, '.', 0x1f, 'v'}, // ▼ - BlackDownPointingTriangle {0x25bc, '.', 0x1f, 'v'}, // ▼ - BlackDownPointingTriangle
{0x25ba, '+', 0x10, '>'}, // ► - BlackRightPointingPointer {0x25b6, '+', 0x10, '>'}, // ▶ - BlackRightPointingTriangle
{0x25c0, ',', 0x11, '<'}, // ◀ - BlackLeftPointingTriangle (1)
{0x25ba, '+', 0x10, '>'}, // ► - BlackRightPointingPointer (1)
{0x25c4, ',', 0x11, '<'}, // ◄ - BlackLeftPointingPointer {0x25c4, ',', 0x11, '<'}, // ◄ - BlackLeftPointingPointer
{0x1ab4, 0, 0xb4, 0}, // ⊐ - NF_rev_left_arrow2 {0x1ab4, 0, 0xb4, 0}, // ⊐ - NF_rev_left_arrow2 (2)
{0x1ab5, 0, 0xb5, 0}, // ► - NF_rev_right_arrow2 {0x1ab5, 0, 0xb5, 0}, // ► - NF_rev_right_arrow2 (2)
{0x1ab7, 0, 0xb7, 0}, // ) - NF_radio_button3 {0x1ab7, 0, 0xb7, 0}, // ) - NF_radio_button3 (2)
{0x1ab8, 0, 0xb8, 0}, // ⎤ - NF_rev_border_corner_upper_right {0x1ab8, 0, 0xb8, 0}, // ⎤ - NF_rev_border_corner_upper_right (2)
{0x1ab9, 0, 0xb9, 0}, // ⎹ - NF_rev_border_line_right {0x1ab9, 0, 0xb9, 0}, // ⎹ - NF_rev_border_line_right (2)
{0x1aba, 0, 0xba, 0}, // ┤ - NF_rev_border_line_vertical_left {0x1aba, 0, 0xba, 0}, // ┤ - NF_rev_border_line_vertical_left (2)
{0x1abb, 0, 0xbb, 0}, // ⎦ - NF_rev_border_corner_lower_right {0x1abb, 0, 0xbb, 0}, // ⎦ - NF_rev_border_corner_lower_right (2)
{0x1abc, 0, 0xbc, 0}, // ⎸ - NF_border_line_left {0x1abc, 0, 0xbc, 0}, // ⎸ - NF_border_line_left (2)
{0x1abd, 0, 0xbd, 0}, //⎹◣ - NF_rev_up_arrow2 {0x1abd, 0, 0xbd, 0}, //⎹◣ - NF_rev_up_arrow2 (2)
{0x1abe, 0, 0xbe, 0}, //⎹◤ - NF_rev_down_arrow2 {0x1abe, 0, 0xbe, 0}, //⎹◤ - NF_rev_down_arrow2 (2)
{0x1ac0, 0, 0xc0, 0}, // └ - NF_border_corner_middle_lower_left {0x1ac0, 0, 0xc0, 0}, // └ - NF_border_corner_middle_lower_left (2)
{0x1ac1, 0, 0xc1, 0}, // ◢⎸ - NF_rev_up_arrow1 {0x1ac1, 0, 0xc1, 0}, // ◢⎸ - NF_rev_up_arrow1 (2)
{0x1ac2, 0, 0xc2, 0}, // ◥⎸ - NF_rev_down_arrow1 {0x1ac2, 0, 0xc2, 0}, // ◥⎸ - NF_rev_down_arrow1 (2)
{0x1ac3, 0, 0xc3, 0}, // ├ - NF_border_line_vertical_right {0x1ac3, 0, 0xc3, 0}, // ├ - NF_border_line_vertical_right (2)
{0x1ac5, 0, 0xc5, 0}, // = - NF_border_line_up_and_down {0x1ac5, 0, 0xc5, 0}, // = - NF_border_line_up_and_down (2)
{0x1ac6, 0, 0xc6, 0}, // = - NF_shadow_box_middle {0x1ac6, 0, 0xc6, 0}, // = - NF_shadow_box_middle (2)
{0x1ac7, 0, 0xc7, 0}, // = - NF_shadow_box_hdd {0x1ac7, 0, 0xc7, 0}, // = - NF_shadow_box_hdd (2)
{0x1ac8, 0, 0xc8, 0}, // ◄ - NF_rev_left_arrow1 {0x1ac8, 0, 0xc8, 0}, // ◄ - NF_rev_left_arrow1 (2)
{0x1ac9, 0, 0xc9, 0}, // ⊏ - NF_rev_right_arrow1 {0x1ac9, 0, 0xc9, 0}, // ⊏ - NF_rev_right_arrow1 (2)
{0x1aca, 0, 0xca, 0}, // [ - NF_rev_menu_button1 {0x1aca, 0, 0xca, 0}, // [ - NF_rev_menu_button1 (2)
{0x1acb, 0, 0xcb, 0}, // - - NF_rev_menu_button2 {0x1acb, 0, 0xcb, 0}, // - - NF_rev_menu_button2 (2)
{0x1acc, 0, 0xcc, 0}, // ┌ - NF_border_corner_middle_upper_left {0x1acc, 0, 0xcc, 0}, // ┌ - NF_border_corner_middle_upper_left (2)
{0x1acd, 0, 0xcd, 0}, // = - NF_shadow_box_cd {0x1acd, 0, 0xcd, 0}, // = - NF_shadow_box_cd (2)
{0x1ace, 0, 0xce, 0}, // [ - NF_shadow_box_left {0x1ace, 0, 0xce, 0}, // [ - NF_shadow_box_left (2)
{0x1acf, 0, 0xcf, 0}, // ┘ - NF_border_corner_middle_lower_right {0x1acf, 0, 0xcf, 0}, // ┘ - NF_border_corner_middle_lower_right (2)
{0x1ad0, 0, 0xd0, 0}, // ┐ - NF_border_corner_middle_upper_right {0x1ad0, 0, 0xd0, 0}, // ┐ - NF_border_corner_middle_upper_right (2)
{0x1ad1, 0, 0xd1, 0}, // = - NF_shadow_box_net {0x1ad1, 0, 0xd1, 0}, // = - NF_shadow_box_net (2)
{0x1ad2, 0, 0xd2, 0}, // ◢ - NF_rev_up_pointing_triangle1 {0x1ad2, 0, 0xd2, 0}, // ◢ - NF_rev_up_pointing_triangle1 (2)
{0x1ad3, 0, 0xd3, 0}, // ⎣ - NF_border_corner_lower_left {0x1ad3, 0, 0xd3, 0}, // ⎣ - NF_border_corner_lower_left (2)
{0x1ad4, 0, 0xd4, 0}, // _ - NF_border_line_bottom {0x1ad4, 0, 0xd4, 0}, // _ - NF_border_line_bottom (2)
{0x1ad5, 0, 0xd5, 0}, // O - NF_radio_button2 {0x1ad5, 0, 0xd5, 0}, // O - NF_radio_button2 (2)
{0x1ad6, 0, 0xd6, 0}, // ● - NF_radio_button2_checked {0x1ad6, 0, 0xd6, 0}, // ● - NF_radio_button2_checked (2)
{0x1ad7, 0, 0xd7, 0}, // ◥ - NF_rev_down_pointing_triangle1 {0x1ad7, 0, 0xd7, 0}, // ◥ - NF_rev_down_pointing_triangle1 (2)
{0x1ad8, 0, 0xd8, 0}, // ¯ - NF_border_line_upper {0x1ad8, 0, 0xd8, 0}, // ¯ - NF_border_line_upper (2)
{0x1ad9, 0, 0xd9, 0}, // ( - NF_radio_button1 {0x1ad9, 0, 0xd9, 0}, // ( - NF_radio_button1 (2)
{0x1ada, 0, 0xda, 0}, // ⎡ - NF_border_corner_upper_left {0x1ada, 0, 0xda, 0}, // ⎡ - NF_border_corner_upper_left (2)
{0x1adc, 0, 0xdc, 0}, // ✓ - NF_shadow_box_checked {0x1adc, 0, 0xdc, 0}, // ✓ - NF_shadow_box_checked (2)
{0x1ae7, 0, 0xe7, 0}, // ║ - NF_rev_border_line_right_and_left {0x1ae7, 0, 0xe7, 0}, // ║ - NF_rev_border_line_right_and_left (2)
{0x1ae8, 0, 0xe8, 0}, // ◣ - NF_rev_up_pointing_triangle2 {0x1ae8, 0, 0xe8, 0}, // ◣ - NF_rev_up_pointing_triangle2 (2)
{0x1ae9, 0, 0xe9, 0}, // ◤ - NF_rev_down_pointing_triangle2 {0x1ae9, 0, 0xe9, 0}, // ◤ - NF_rev_down_pointing_triangle2 (2)
{0x1af4, 0, 0xf4, 0}, // ] - NF_rev_menu_button3 {0x1af4, 0, 0xf4, 0}, // ] - NF_rev_menu_button3 (2)
{0x1af5, 0, 0xf5, 0}, // ] - NF_shadow_box_right {0x1af5, 0, 0xf5, 0}, // ] - NF_shadow_box_right (2)
{0x1afb, 0, 0xfb, 0}, // ✓ - NF_check_mark {0x1afb, 0, 0xfb, 0}, // ✓ - NF_check_mark (2)
{0x221a, 0, 0xfb, 'x'}, // √ - square root {0x221a, 0, 0xfb, 'x'}, // √ - square root
{0x25cf, '`', 0x04, '*'} // ● - black circle {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; 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_block , fc::FullBlock}, // █
{fc::vt100_key_nsup , fc::SuperscriptLatinSmallLetterN}, // ⁿ {fc::vt100_key_nsup , fc::SuperscriptLatinSmallLetterN}, // ⁿ
{fc::vt100_key_blackrect, fc::BlackVerticalRectangle}, // ▮ {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_ckboard , fc::MediumShade}, // ▒
{fc::vt100_key_htab , fc::SymbolForHorizontalTab}, // ␉ {fc::vt100_key_htab , fc::SymbolForHorizontalTab}, // ␉
{fc::vt100_key_ff , fc::SymbolForFormFeed}, // ␌ {fc::vt100_key_ff , fc::SymbolForFormFeed}, // ␌

View File

@ -1,34 +1,53 @@
// File: fcheckbox.h /************************************************************************
// Provides: class FCheckBox * fcheckbox.h - Widget FCheckBox *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FToggleButton ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FCheckBox ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FToggleButton
*
*
*
*
* FCheckBox
*
*/
#ifndef FCHECKBOX_H #ifndef FCHECKBOX_H
#define FCHECKBOX_H #define FCHECKBOX_H

View File

@ -1,34 +1,53 @@
// File: fcheckmenuitem.h /************************************************************************
// Provides: class FCheckMenuItem * fcheckmenuitem.h - Widget FCheckMenuItem *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FMenuItem ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ *
// ▕ FCheckMenuItem ▏- - - - -▕ FMenu ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FMenuItem
*
*
*
* * 1
* FCheckMenuItem - - - - - FMenu
*
*/
#ifndef FCHECKMENUITEM_H #ifndef FCHECKMENUITEM_H
#define FCHECKMENUITEM_H #define FCHECKMENUITEM_H

View File

@ -1,34 +1,53 @@
// File: fdialog.h /************************************************************************
// Provides: class FDialog * fdialog.h - Widget FDialog *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2012-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FDialog ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FWindow
*
*
*
*
* FDialog
*
*/
#ifndef FDIALOG_H #ifndef FDIALOG_H
#define FDIALOG_H #define FDIALOG_H

View File

@ -1,41 +1,60 @@
// File: fdialoglistmenu.h /************************************************************************
// Provides: class FDialogListMenu * fdialoglistmenu.h - Widget FDialogListMenu *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2016-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ ▕ FMenuList ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ ▲ *
// │ │ *
// └─────┬─────┘ *
// │ *
// ▕▔▔▔▔▔▔▔▏ *
// ▕ FMenu ▏ *
// ▕▁▁▁▁▁▁▁▏ * FVTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FDialogListMenu ▏- - - - - -▕ FMenuItem ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏1 1▕▁▁▁▁▁▁▁▁▁▁▁▏ * FWidget
*
*
*
*
* FWindow FMenuList
*
*
*
*
*
*
* FMenu
*
*
*
*
* FDialogListMenu - - - - - - FMenuItem
* 1 1
*/
#ifndef FDIALOGLISTMENU_H #ifndef FDIALOGLISTMENU_H
#define FDIALOGLISTMENU_H #define FDIALOGLISTMENU_H

View File

@ -1,54 +1,72 @@
// File: fevent.h /************************************************************************
// Provides: class FEvent * fevent.h - Base event class of widgets *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FEvent ▏ * 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. *
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▏ * *
// ├─────▏FKeyEvent ▏ * 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. *
// ├─────▏FMouseEvent ▏ * *
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * You should have received a copy of the GNU General Public License *
// │ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ ************************************************************************/
// ├─────▏FWheelEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
// ├─────▏FFocusEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
// ├─────▏FAccelEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
// ├─────▏FResizeEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▏
// ├─────▏FShowEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▏
// ├─────▏FHideEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
// ├─────▏FCloseEvent ▏
// │ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
// │
// │ ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
// └─────▏FTimerEvent ▏
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
/* Inheritance diagram
*
*
*
* FEvent
*
*
*
*
* FKeyEvent
*
*
*
* FMouseEvent
*
*
*
* FWheelEvent
*
*
*
* FFocusEvent
*
*
*
* FAccelEvent
*
*
*
* FResizeEvent
*
*
*
* FShowEvent
*
*
*
* FHideEvent
*
*
*
* FCloseEvent
*
*
*
* FTimerEvent
*
*/
#ifndef FEVENT_H #ifndef FEVENT_H
#define FEVENT_H #define FEVENT_H

View File

@ -1,39 +1,58 @@
// File: ffiledialog.h /************************************************************************
// Provides: class FFileDialog * ffiledialog.h - Widget FFileDialog (a file chooser dialog) *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FDialog ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ *
// ▲ *
// │ * FVTerm
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FFileDialog ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ *
*
* FWidget
*
*
*
*
* FWindow
*
*
*
*
* FDialog
*
*
*
*
* FFileDialog
*
*/
#ifndef FFILEDIALOG_H #ifndef FFILEDIALOG_H
#define FFILEDIALOG_H #define FFILEDIALOG_H

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#ifndef FINAL_H #ifndef FINAL_H
#define FINAL_H #define FINAL_H

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#ifndef FKEYMAP_H #ifndef FKEYMAP_H
#define FKEYMAP_H #define FKEYMAP_H

View File

@ -1,29 +1,48 @@
// File: flabel.h /************************************************************************
// Provides: class FLabel * flabel.cpp - Widget FLabel *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▏ *
// ▕ FLabel ▏ *
// ▕▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FLabel
*
*/
#ifndef FLABEL_H #ifndef FLABEL_H
#define FLABEL_H #define FLABEL_H

View File

@ -1,29 +1,48 @@
// File: flineedit.h /************************************************************************
// Provides: class FLineEdit * flineedit.h - Widget FLineEdit *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2012-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FLineEdit ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FLineEdit
*
*/
#ifndef FLINEEDIT_H #ifndef FLINEEDIT_H
#define FLINEEDIT_H #define FLINEEDIT_H

View File

@ -1,31 +1,49 @@
// File: flistbox.h /************************************************************************
// Provides: class FListBoxItem * flistbox.h - Widget FListBox and FListBoxItem *
// class FListBox * *
// * This file is part of the Final Cut widget toolkit *
// Inheritance diagram * *
// ═══════════════════ * Copyright 2014-2017 Markus Gans *
// * *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * The Final Cut is free software; you can redistribute it and/or modify *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕▔▔▔▔▔▔▔▔▔▏ ************************************************************************/
// ▕ FWidget ▏
// ▕▁▁▁▁▁▁▁▁▁▏ /* Inheritance diagram
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FListBox ▏- - - -▕ FListBoxItem ▏ * FObject FTerm
// ▕▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ *
// *
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
* 1 *
* FListBox - - - - FListBoxItem
*
*
*/
#ifndef FLISTBOX_H #ifndef FLISTBOX_H
#define FLISTBOX_H #define FLISTBOX_H

View File

@ -1,36 +1,55 @@
// File: fmenubar.h /************************************************************************
// Provides: class FMenu * fmenu.h - Widget FMenu *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
// ▕▁▁▁▁▁▁▁▁▏ *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * GNU General Public License for more details. *
// ▲ ┌ - -▕ FRadioMenuItem ▏ * *
// │ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * You should have received a copy of the GNU General Public License *
// ▕▔▔▔▔▔▔▔▔▔▏ : * along with this program. If not, see <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏ ├ - -▕ FCheckMenuItem ▏
// ▲ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ /* Inheritance diagram
// │ 1 : *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏- ┘ ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ ▕ FMenuList ▏- - - -▕ FMenuItem ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏1 *▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ ▲ 1: *
// │ │ : *
// └─────┬─────┘ : *
// │ 1 : *
// ▕▔▔▔▔▔▔▔▏- - - ┘ ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FMenu ▏- - - - - - - -▕ FMenuItem ▏ *
// ▕▁▁▁▁▁▁▁▏1 1▕▁▁▁▁▁▁▁▁▁▁▁▏ * FVTerm
* *
* - - FRadioMenuItem
* :
* :
* FWidget : *
* - - FCheckMenuItem
* :
* 1 :
* -
* FWindow FMenuList - - - - FMenuItem
* 1 *
* 1:
* :
* :
* 1 :
* - - -
* FMenu - - - - - - - - FMenuItem
* 1 1
*/
#ifndef FMENU_H #ifndef FMENU_H
#define FMENU_H #define FMENU_H

View File

@ -1,36 +1,55 @@
// File: fmenubar.h /************************************************************************
// Provides: class FMenuBar * fmenubar.h - Widget FMenuBar *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ ▕ FMenuList ▏- - - -▕ FMenuItem ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ ▲ *
// │ │ *
// └─────┬─────┘ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FMenuBar ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▏ * FVTerm
*
*
*
*
* FWidget
*
*
*
* 1 *
* FWindow FMenuList - - - - FMenuItem
*
*
*
*
*
*
* FMenuBar
*
*/
#ifndef FMENUBAR_H #ifndef FMENUBAR_H
#define FMENUBAR_H #define FMENUBAR_H

View File

@ -1,33 +1,52 @@
// File: fmenuitem.h /************************************************************************
// Provides: class FMenuItem * fmenuitem.h - Widget FMenuItem *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ *
// ▕ FMenuItem ▏-┬- - - -▕ FMenu ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▏ * FObject FTerm
// : *
// : 1▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// └- - - -▕ FMenuList ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ *
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
* * 1
* FMenuItem -- - - - FMenu
* :
* :
* : 1
* - - - - FMenuList
*
*/
#ifndef FMENUITEM_H #ifndef FMENUITEM_H
#define FMENUITEM_H #define FMENUITEM_H

View File

@ -1,20 +1,39 @@
// File: fmenulist.h /************************************************************************
// Provides: class FMenuList * fmenulist.h - Menu item container base class *
// * *
// Base class * This file is part of the Final Cut widget toolkit *
// ══════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FMenuList ▏- - - -▕ FMenuItem ▏ * 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 *
// :1 * the Free Software Foundation; either version 3 of the License, or *
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * (at your option) any later version. *
// ├- - - - - - -▕ FRadioMenuItem ▏ * *
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * 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 *
// └- - - - - - -▕ FCheckMenuItem ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Base class
*
*
* 1 *
* FMenuList - - - - FMenuItem
*
* :1
* : *
* - - - - - - - FRadioMenuItem
* :
* :
* : *
* - - - - - - - FCheckMenuItem
*
*/
#ifndef FMENULIST_H #ifndef FMENULIST_H
#define FMENULIST_H #define FMENULIST_H

View File

@ -1,39 +1,58 @@
// File: fmessagebox.h /************************************************************************
// Provides: class FMessageBox * fmessagebox.h - Widget FMessageBox (a text message window) *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FDialog ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ *
// ▲ *
// │ * FVTerm
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FMessageBox ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ *
*
* FWidget
*
*
*
*
* FWindow
*
*
*
*
* FDialog
*
*
*
*
* FMessageBox
*
*/
#ifndef FMESSAGEBOX_H #ifndef FMESSAGEBOX_H
#define FMESSAGEBOX_H #define FMESSAGEBOX_H

View File

@ -1,12 +1,31 @@
// File: fobject.h /************************************************************************
// Provides: class FObject * fobject.h - Object container base class of all widget objects *
// * *
// Base class * This file is part of the Final Cut widget toolkit *
// ══════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Base class
*
*
*
* FObject
*
*/
#ifndef FOBJECT_H #ifndef FOBJECT_H
#define FOBJECT_H #define FOBJECT_H

View File

@ -1,12 +1,31 @@
// File: foptiattr.h /************************************************************************
// Provides: class FOptiAttr * foptiattr.h - Sets video attributes in optimized order *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2016-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FOptiAttr ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* FOptiAttr
*
*/
#ifndef FOPTIATTR_H #ifndef FOPTIATTR_H
#define FOPTIATTR_H #define FOPTIATTR_H

View File

@ -1,12 +1,31 @@
// File: foptimove.h /************************************************************************
// Provides: class FOptiMove * foptimove.cpp - Cursor movement optimization *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FOptiMove ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* FOptiMove
*
*/
// The cursor optimization based on ncurses lib_mvcur.c // The cursor optimization based on ncurses lib_mvcur.c
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,12 +1,31 @@
// File: fpoint.h /************************************************************************
// Provides: class FPoint * fpoint.h - Point with an x and y coordinate *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▏ * *
// ▕ FPoint ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* FPoint
*
*/
#ifndef FPOINT_H #ifndef FPOINT_H
#define FPOINT_H #define FPOINT_H

View File

@ -1,29 +1,48 @@
// File: fprogressbar.h /************************************************************************
// Provides: class FProgressbar * fprogressbar.h - Widget FProgressbar *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FProgressbar ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FProgressbar
*
*/
#ifndef FPROGRESSBAR_H #ifndef FPROGRESSBAR_H
#define FPROGRESSBAR_H #define FPROGRESSBAR_H

View File

@ -1,34 +1,53 @@
// File: fradiobutton.h /************************************************************************
// Provides: class FRadioButton * fradiobutton.h - Widget FRadioButton *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FToggleButton ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FRadioButton ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FToggleButton
*
*
*
*
* FRadioButton
*
*/
#ifndef FRADIOBUTTON_H #ifndef FRADIOBUTTON_H
#define FRADIOBUTTON_H #define FRADIOBUTTON_H

View File

@ -1,34 +1,53 @@
// File: fradiomenuitem.h /************************************************************************
// Provides: class FRadioMenuItem * fradiomenuitem.h - Widget FRadioMenuItem *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FMenuItem ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏ *
// ▕ FRadioMenuItem ▏- - - - -▕ FMenu ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FMenuItem
*
*
*
* * 1
* FRadioMenuItem - - - - - FMenu
*
*/
#ifndef FRADIOMENUITEM_H #ifndef FRADIOMENUITEM_H
#define FRADIOMENUITEM_H #define FRADIOMENUITEM_H

View File

@ -1,12 +1,31 @@
// File: frect.h /************************************************************************
// Provides: class FRect * frect.h - Rectangle with position and size *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ * *
// ▕ FRect ▏- - - -▕ FPoint ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
* 1 *
* FRect - - - - FPoint
*
*/
#ifndef FRECT_H #ifndef FRECT_H
#define FRECT_H #define FRECT_H

View File

@ -1,29 +1,48 @@
// File: fscrollbar.h /************************************************************************
// Provides: class FScrollbar * fscrollbar.h - Widget FScrollbar *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2012-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FScrollbar ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FScrollbar
*
*/
#ifndef FSCROLLBAR_H #ifndef FSCROLLBAR_H
#define FSCROLLBAR_H #define FSCROLLBAR_H
@ -122,7 +141,7 @@ class FScrollbar : public FWidget
int min; int min;
int max; int max;
double steps; double steps;
int pageSize; int pagesize;
int length; int length;
int bar_orientation; int bar_orientation;
int max_color; int max_color;

View File

@ -1,30 +1,49 @@
// File: fscrollview.h /************************************************************************
// Provides: class FScrollView * fscrollview.h - Widget FScrollView (a scrolling area with on-demand *
// * scroll bars) *
// Inheritance diagram * *
// ═══════════════════ * This file is part of the Final Cut widget toolkit *
// * *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * Copyright 2017 Markus Gans *
// ▕ FObject ▏ ▕ FTerm ▏ * *
// ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏ * 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, *
// ▕ FVTerm ▏ * 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 *
// ▕ FWidget ▏ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
// ▕▁▁▁▁▁▁▁▁▁▏ ************************************************************************/
// ▲
// │
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
// ▕ FScrollView ▏
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
/* Inheritance diagram
*
*
*
* FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FScrollView
*
*/
#ifndef FSCROLLVIEW_H #ifndef FSCROLLVIEW_H
#define FSCROLLVIEW_H #define FSCROLLVIEW_H

View File

@ -1,37 +1,55 @@
// File: fstatusbar.h /************************************************************************
// Provides: class FStatusKey * fstatusbar.h - Widget FStatusBar and FStatusKey *
// class FStatusBar * *
// * This file is part of the Final Cut widget toolkit *
// Inheritance diagram * *
// ═══════════════════ * Copyright 2014-2017 Markus Gans *
// * *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * The Final Cut is free software; you can redistribute it and/or modify *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕▔▔▔▔▔▔▔▔▔▏ ************************************************************************/
// ▕ FWidget ▏
// ▕▁▁▁▁▁▁▁▁▁▏ /* Inheritance diagram
// ▲ *
// │ *
// ├────────────────────┐ *
// │ │ * FObject FTerm
// ▕▔▔▔▔▔▔▔▔▔▏ │ *
// ▕ FWindow ▏ │ *
// ▕▁▁▁▁▁▁▁▁▁▏ │ *
// ▲ │ *
// │ │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FStatusBar ▏- - - -▕ FStatusKey ▏ * FVTerm
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ *
*
*
*
* FWidget
*
*
*
*
*
*
* FWindow
*
*
*
* 1 *
* FStatusBar - - - - FStatusKey
*
*/
#ifndef FSTATUSBAR_H #ifndef FSTATUSBAR_H
#define FSTATUSBAR_H #define FSTATUSBAR_H

View File

@ -1,12 +1,31 @@
// File: fstring.h /************************************************************************
// Provides: class FString * fstring.h - Unicode string class with UTF-8 support *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2012-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FString ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* FString
*
*/
#ifndef FSTRING_H #ifndef FSTRING_H
#define FSTRING_H #define FSTRING_H
@ -39,6 +58,7 @@ class FString;
// Global typedef // Global typedef
typedef std::vector<FString> FStringList; typedef std::vector<FString> FStringList;
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FString // class FString
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -1,34 +1,53 @@
// File: fswitch.h /************************************************************************
// Provides: class FSwitch * fswitch.h - Widget FSwitch *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FToggleButton ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FSwitch ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FToggleButton
*
*
*
*
* FSwitch
*
*/
#ifndef FSWITCH_H #ifndef FSWITCH_H
#define FSWITCH_H #define FSWITCH_H

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#ifndef FTCAPMAP_H #ifndef FTCAPMAP_H
#define FTCAPMAP_H #define FTCAPMAP_H

View File

@ -1,28 +1,47 @@
// File: fterm.h /************************************************************************
// Provides: class FTerm * fterm.h - Base class for terminal detection and control *
// * *
// Base class * This file is part of the Final Cut widget toolkit *
// ══════════ * *
// * Copyright 2012-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FTerm ▏-┬- - - -▕ FOptiMove ▏ * 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 *
// : 1▕▔▔▔▔▔▔▔▔▔▔▔▏ * (at your option) any later version. *
// :- - - -▕ FOptiAttr ▏ * *
// : ▕▁▁▁▁▁▁▁▁▁▁▁▏ * 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 *
// :- - - -▕ FString ▏ * 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 <http://www.gnu.org/licenses/>. *
// :- - - -▕ FPoint ▏ ************************************************************************/
// : ▕▁▁▁▁▁▁▁▁▏
// : /* Base class
// : *▕▔▔▔▔▔▔▔▏ *
// └- - - -▕ FRect ▏ *
// ▕▁▁▁▁▁▁▁▏ * 1 1
* FTerm -- - - - FOptiMove
* :
* :
* : 1
* :- - - - FOptiAttr
* :
* :
* : *
* :- - - - FString
* :
* :
* : *
* :- - - - FPoint
* :
* :
* : *
* - - - - FRect
*
*/
#ifndef FTERM_H #ifndef FTERM_H
#define FTERM_H #define FTERM_H

View File

@ -1,13 +1,31 @@
// File: ftermbuffer.h /************************************************************************
// Provides: class FTermBuffer * ftermbuffer.h - Buffer for virtual terminal strings *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FTermBuffer ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* FTermBuffer
*
*/
#ifndef FTERMBUFFER_H #ifndef FTERMBUFFER_H
#define FTERMBUFFER_H #define FTERMBUFFER_H

View File

@ -1,12 +1,31 @@
// File: ftermcap.h /************************************************************************
// Provides: class FTermcap * ftermcap.h - Provides access to terminal capabilities *
// * *
// Standalone class * This file is part of the Final Cut widget toolkit *
// ════════════════ * *
// * Copyright 2016-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FTermcap ▏ * 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
/* Standalone class
*
*
*
* FTermcap
*
*/
#ifndef FTERMCAP_H #ifndef FTERMCAP_H
#define FTERMCAP_H #define FTERMCAP_H
@ -16,6 +35,7 @@
#include <string> #include <string>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FTermcap // class FTermcap
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -1,29 +1,48 @@
// File: ftextview.h /************************************************************************
// Provides: class FTextView * ftextview.h - Widget FTextView (a multiline text viewer) *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FTextView ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FTextView
*
*/
#ifndef FTEXTVIEW_H #ifndef FTEXTVIEW_H
#define FTEXTVIEW_H #define FTEXTVIEW_H

View File

@ -1,29 +1,48 @@
// File: ftogglebutton.h /************************************************************************
// Provides: class FToggleButton * ftogglebutton.h - Intermediate base class for a toggle button *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2014-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FToggleButton ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
*
*
*
*
*
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FToggleButton
*
*/
#ifndef FTOGGLEBUTTON_H #ifndef FTOGGLEBUTTON_H
#define FTOGGLEBUTTON_H #define FTOGGLEBUTTON_H

View File

@ -1,34 +1,53 @@
// File: ftooltip.h /************************************************************************
// Provides: class FTooltip * ftooltip.h - Widget FToolTip *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2016-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ * FObject FTerm
// ▲ *
// │ *
// ▕▔▔▔▔▔▔▔▔▔▔▏ *
// ▕ FToolTip ▏ *
// ▕▁▁▁▁▁▁▁▁▁▁▏ *
*
* FVTerm
*
*
*
*
* FWidget
*
*
*
*
* FWindow
*
*
*
*
* FToolTip
*
*/
#ifndef FTOOLTIP_H #ifndef FTOOLTIP_H
#define FTOOLTIP_H #define FTOOLTIP_H

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#ifndef FTYPES_H #ifndef FTYPES_H
#define FTYPES_H #define FTYPES_H

View File

@ -1,27 +1,46 @@
// File: fvterm.h /************************************************************************
// Provides: class FVTerm * fvterm.h - Virtual terminal implementation *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2016-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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, *
// ▕▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▔▏ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
// ▕ FVTerm ▏-┬- - - -▕ FString ▏ * 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 *
// :- - - -▕ FPoint ▏ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
// : ▕▁▁▁▁▁▁▁▁▏ ************************************************************************/
// :
// : *▕▔▔▔▔▔▔▔▏ /* Inheritance diagram
// └- - - -▕ FRect ▏ *
// ▕▁▁▁▁▁▁▁▏ *
*
* FObject FTerm
*
*
*
*
*
* 1 *
* FVTerm -- - - - FString
* :
* :
* : *
* :- - - - FPoint
* :
* :
* : *
* - - - - FRect
*
*/
#ifndef FVTERM_H #ifndef FVTERM_H
#define FVTERM_H #define FVTERM_H
@ -59,6 +78,8 @@ class FVTerm : public FObject, public FTerm
typedef FOptiAttr::char_data char_data; typedef FOptiAttr::char_data char_data;
typedef void (FVTerm::*FPreprocessingHandler)(); typedef void (FVTerm::*FPreprocessingHandler)();
struct term_area; // forward declaration
struct vterm_preprocessing struct vterm_preprocessing
{ {
FVTerm* instance; FVTerm* instance;
@ -67,58 +88,6 @@ class FVTerm : public FObject, public FTerm
typedef std::vector<vterm_preprocessing> FPreprocessing; typedef std::vector<vterm_preprocessing> 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 enum covered_state
{ {
non_covered, non_covered,
@ -418,9 +387,69 @@ class FVTerm : public FObject, public FTerm
static bool stop_terminal_updates; static bool stop_terminal_updates;
static int skipped_terminal_update; static int skipped_terminal_update;
}; };
#pragma pack(pop) #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 // FVTerm inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------
template<class type> template<class type>

View File

@ -1,72 +1,91 @@
// File: fwidget.h /************************************************************************
// Provides: class FWidget * fwidget.h - Intermediate base class for all widget objects *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 *
// ▕▔▔▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▔▏ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏-┬- - - -▕ FStatusBar ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏
// : /* Inheritance diagram
// : 1▕▔▔▔▔▔▔▔▔▔▔▏ *
// :- - - -▕ FMenuBar ▏ *
// : ▕▁▁▁▁▁▁▁▁▁▁▏ *
// : * FObject FTerm
// : *▕▔▔▔▔▔▔▔▔▔▏ *
// :- - - -▕ FString ▏ *
// : ▕▁▁▁▁▁▁▁▁▁▏ *
// : *
// : *▕▔▔▔▔▔▔▔▔▏ *
// :- - - -▕ FEvent ▏ *
// : ▕▁▁▁▁▁▁▁▁▏ * FVTerm
// : *
// : *▕▔▔▔▔▔▔▔▔▔▔▔▏ *
// :- - - -▕ FKeyEvent ▏ *
// : ▕▁▁▁▁▁▁▁▁▁▁▁▏ * 1 1
// : * FWidget -- - - - FStatusBar
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FMouseEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * : 1
// : * :- - - - FMenuBar
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FWheelEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
// : * :- - - - FString
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FFocusEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
// : * :- - - - FEvent
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FAccelEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
// : * :- - - - FKeyEvent
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FResizeEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
// : * :- - - - FMouseEvent
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FShowEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
// : * :- - - - FWheelEvent
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// :- - - -▕ FHideEvent ▏ * :
// : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
// : * :- - - - FFocusEvent
// : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏ * :
// └- - - -▕ FCloseEvent ▏ * :
// ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏ * : *
* :- - - - FAccelEvent
* :
* :
* : *
* :- - - - FResizeEvent
* :
* :
* : *
* :- - - - FShowEvent
* :
* :
* : *
* :- - - - FHideEvent
* :
* :
* : *
* - - - - FCloseEvent
*
*/
#ifndef FWIDGET_H #ifndef FWIDGET_H
#define FWIDGET_H #define FWIDGET_H

View File

@ -1,37 +1,56 @@
// File: fwindow.h /************************************************************************
// Provides: class FWindow * fwindow.h - Intermediate base class for all window objects *
// * *
// Inheritance diagram * This file is part of the Final Cut widget toolkit *
// ═══════════════════ * *
// * Copyright 2015-2017 Markus Gans *
// ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏ * *
// ▕ FObject ▏ ▕ FTerm ▏ * 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 *
// ▕ FVTerm ▏ * 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 <http://www.gnu.org/licenses/>. *
// ▕ FWidget ▏ ************************************************************************/
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲ /* Inheritance diagram
// │ *
// ▕▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▔▏ *
// ▕ FWindow ▏-┬- - - -▕ FEvent ▏ *
// ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▏ * FObject FTerm
// : *
// : *▕▔▔▔▔▔▔▔▔▏ *
// :- - - -▕ FPoint ▏ *
// : ▕▁▁▁▁▁▁▁▁▏ *
// : *
// : *▕▔▔▔▔▔▔▔▔▔▏ *
// └- - - -▕ FWidget ▏ * FVTerm
// ▕▁▁▁▁▁▁▁▁▁▏ *
*
*
*
* FWidget
*
*
*
* 1 *
* FWindow -- - - - FEvent
* :
* :
* : *
* :- - - - FPoint
* :
* :
* : *
* - - - - FWidget
*
*/
#ifndef FWINDOW_H #ifndef FWINDOW_H
#define FWINDOW_H #define FWINDOW_H

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <string> #include <string>
@ -373,6 +391,7 @@ void FApplication::cmd_options ()
while ( true ) while ( true )
{ {
int c, idx = 0; int c, idx = 0;
static struct option long_options[] = static struct option long_options[] =
{ {
{"encoding", required_argument, 0, 0 }, {"encoding", required_argument, 0, 0 },
@ -381,6 +400,7 @@ void FApplication::cmd_options ()
{"newfont", no_argument, 0, 0 }, {"newfont", no_argument, 0, 0 },
{0, 0, 0, 0 } {0, 0, 0, 0 }
}; };
opterr = 0; opterr = 0;
c = getopt_long ( app_argc c = getopt_long ( app_argc
, app_argv , app_argv
@ -1262,7 +1282,7 @@ bool FApplication::parseSGRMouse()
const FPoint& mouse_position = getMousePos(); const FPoint& mouse_position = getMousePos();
register char* p; register char* p;
int button; int button;
uChar x, y; short x, y;
enum x11_ext_btn_states enum x11_ext_btn_states
{ {
@ -1303,7 +1323,7 @@ bool FApplication::parseSGRMouse()
{ {
if ( *p < '0' || *p > '9') if ( *p < '0' || *p > '9')
return false; return false;
x = uChar(10 * x + (*p - '0')); x = short(10 * x + (*p - '0'));
} }
while ( *p++ && *p != 'M' && *p != 'm' ) while ( *p++ && *p != 'M' && *p != 'm' )
@ -1311,7 +1331,7 @@ bool FApplication::parseSGRMouse()
if ( *p < '0' || *p > '9') if ( *p < '0' || *p > '9')
return false; return false;
y = uChar(10 * y + (*p - '0')); y = short(10 * y + (*p - '0'));
} }
new_mouse_position.setPoint (x, y); new_mouse_position.setPoint (x, y);
@ -1431,7 +1451,7 @@ bool FApplication::parseUrxvtMouse()
register bool x_neg; register bool x_neg;
register bool y_neg; register bool y_neg;
int button; int button;
uChar x, y; short x, y;
enum urxvt_btn_states enum urxvt_btn_states
{ {
@ -1481,7 +1501,7 @@ bool FApplication::parseUrxvtMouse()
if ( *p < '0' || *p > '9') if ( *p < '0' || *p > '9')
return false; return false;
x = uChar(10 * x + (*p - '0')); x = short(10 * x + (*p - '0'));
p++; p++;
} }
@ -1496,7 +1516,7 @@ bool FApplication::parseUrxvtMouse()
if ( *p < '0' || *p > '9') if ( *p < '0' || *p > '9')
return false; return false;
y = uChar(10 * y + (*p - '0')); y = short(10 * y + (*p - '0'));
p++; p++;
} }
@ -1507,10 +1527,10 @@ bool FApplication::parseUrxvtMouse()
y = 1; y = 1;
if ( x > getColumnNumber() ) if ( x > getColumnNumber() )
x = uChar(getColumnNumber()); x = short(getColumnNumber());
if ( y > getLineNumber() ) if ( y > getLineNumber() )
y = uChar(getLineNumber()); y = short(getLineNumber());
new_mouse_position.setPoint (x, y); new_mouse_position.setPoint (x, y);
// fill bit field with 0 // fill bit field with 0

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/fbutton.h" #include "final/fbutton.h"
@ -494,16 +512,29 @@ inline void FButton::detectHotkey()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FButton::draw() 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* src;
register wchar_t* dest; register wchar_t* dest;
wchar_t* ButtonText; wchar_t* ButtonText;
FString txt; FString txt;
FWidget* parent_widget = getParentWidget(); 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()); length = int(text.getLength());
hotkeypos = -1; hotkeypos = -1;
@ -648,7 +679,7 @@ void FButton::draw()
if ( getHeight() >= 2 ) if ( getHeight() >= 2 )
j = int((getHeight() - 1) / 2); j = int((getHeight() - 1) / 2);
else else
j=0; j = 0;
setPrintPos (1 + margin + d, 1 + j); setPrintPos (1 + margin + d, 1 + j);
setColor (button_fg, button_bg); setColor (button_fg, button_bg);

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/fbuttongroup.h" #include "final/fbuttongroup.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fcheckbox.h" #include "final/fcheckbox.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fcheckmenuitem.h" #include "final/fcheckmenuitem.h"
#include "final/fmenu.h" #include "final/fmenu.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FCheckMenuItem // class FCheckMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/fdialog.h" #include "final/fdialog.h"
@ -178,7 +196,7 @@ int FDialog::exec()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FDialog::setPos (int x, int y, bool) 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; FRect old_geometry;
if ( getX() == x && getY() == y ) if ( getX() == x && getY() == y )
@ -194,10 +212,10 @@ void FDialog::setPos (int x, int y, bool)
if ( isZoomed() ) if ( isZoomed() )
return; return;
dx = getX() - x; int dx = getX() - x
dy = getY() - y; , dy = getY() - y
old_x = getTermX(); , old_x = getTermX()
old_y = getTermY(); , old_y = getTermY();
const FPoint& shadow = getShadow(); const FPoint& shadow = getShadow();
rsw = shadow.getX(); // right shadow width; rsw = shadow.getX(); // right shadow width;
bsh = shadow.getY(); // bottom shadow height 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) 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 ) if ( getWidth() == w && getHeight() == h )
return; return;
@ -299,15 +316,15 @@ void FDialog::setSize (int w, int h, bool adjust)
if ( isZoomed() ) if ( isZoomed() )
return; return;
x = getTermX(); int x = getTermX()
y = getTermY(); , y = getTermY()
old_width = getWidth(); , old_width = getWidth()
old_height = getHeight(); , old_height = getHeight()
dw = old_width - w; , dw = old_width - w
dh = old_height - h; , dh = old_height - h;
const FPoint& shadow = getShadow(); const FPoint& shadow = getShadow();
rsw = shadow.getX(); // right shadow width; int rsw = shadow.getX(); // right shadow width;
bsh = shadow.getY(); // bottom shadow height int bsh = shadow.getY(); // bottom shadow height
FWindow::setSize (w, h, adjust); FWindow::setSize (w, h, adjust);
@ -529,9 +546,9 @@ void FDialog::onKeyPress (FKeyEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FDialog::onMouseDown (FMouseEvent* ev) void FDialog::onMouseDown (FMouseEvent* ev)
{ {
int mouse_x = ev->getX(); int mouse_x = ev->getX()
int mouse_y = ev->getY(); , mouse_y = ev->getY()
int zoom_btn; , zoom_btn;
if ( ! isResizeable() ) if ( ! isResizeable() )
zoom_btn = 0; zoom_btn = 0;
@ -651,10 +668,10 @@ void FDialog::onMouseUp (FMouseEvent* ev)
if ( ev->getButton() == fc::LeftButton ) if ( ev->getButton() == fc::LeftButton )
{ {
int mouse_x = ev->getX(); int mouse_x = ev->getX()
int mouse_y = ev->getY(); , mouse_y = ev->getY()
int titlebar_x = titlebar_click_pos.getX(); , titlebar_x = titlebar_click_pos.getX()
int titlebar_y = titlebar_click_pos.getY(); , titlebar_y = titlebar_click_pos.getY();
if ( ! titlebar_click_pos.isNull() if ( ! titlebar_click_pos.isNull()
&& titlebar_x > getTermX() + 3 && titlebar_x > getTermX() + 3
@ -689,10 +706,10 @@ void FDialog::onMouseUp (FMouseEvent* ev)
{ {
FWidget* r = getRootWidget(); FWidget* r = getRootWidget();
resize_click_pos = ev->getTermPos(); resize_click_pos = ev->getTermPos();
int x2 = resize_click_pos.getX(); int x2 = resize_click_pos.getX()
int y2 = resize_click_pos.getY(); , y2 = resize_click_pos.getY()
int x2_offset = 0; , x2_offset = 0
int y2_offset = 0; , y2_offset = 0;
if ( r ) if ( r )
{ {
@ -800,10 +817,10 @@ void FDialog::onMouseMove (FMouseEvent* ev)
{ {
FWidget* r = getRootWidget(); FWidget* r = getRootWidget();
resize_click_pos = ev->getTermPos(); resize_click_pos = ev->getTermPos();
int x2 = resize_click_pos.getX(); int x2 = resize_click_pos.getX()
int y2 = resize_click_pos.getY(); , y2 = resize_click_pos.getY()
int x2_offset = 0; , x2_offset = 0
int y2_offset = 0; , y2_offset = 0;
if ( r ) if ( r )
{ {
@ -832,7 +849,11 @@ void FDialog::onMouseMove (FMouseEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FDialog::onMouseDoubleClick (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 ) if ( ev->getButton() != fc::LeftButton )
return; return;
@ -1160,10 +1181,10 @@ void FDialog::init()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FDialog::drawBorder() void FDialog::drawBorder()
{ {
int x1 = 1; int x1 = 1
int x2 = 1 + getWidth() - 1; , x2 = 1 + getWidth() - 1
int y1 = 2; , y1 = 2
int y2 = 1 + getHeight() - 1; , y2 = 1 + getHeight() - 1;
if ( (getMoveSizeWidget() == this || ! resize_click_pos.isNull()) if ( (getMoveSizeWidget() == this || ! resize_click_pos.isNull())
&& ! isZoomed() ) && ! isZoomed() )
@ -1204,7 +1225,10 @@ void FDialog::drawBorder()
void FDialog::drawTitleBar() void FDialog::drawTitleBar()
{ {
static const int menu_btn = 3; static const int menu_btn = 3;
int i, x, length, zoom_btn; int i
, x
, length
, zoom_btn;
// draw the title button // draw the title button
setPrintPos (1, 1); setPrintPos (1, 1);

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fdialoglistmenu.h" #include "final/fdialoglistmenu.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FDialogListMenu // class FDialogListMenu
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <cstdio> #include <cstdio>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <vector> #include <vector>
@ -326,9 +344,9 @@ int FFileDialog::readDir()
} }
if ( std::strcmp((*dir_entries.begin()).name, "..") == 0 ) if ( std::strcmp((*dir_entries.begin()).name, "..") == 0 )
start=1; start = 1;
else else
start=0; start = 0;
dir_num = numOfDirs(); dir_num = numOfDirs();
// directories first // directories first
@ -457,7 +475,11 @@ const FString FFileDialog::fileSaveChooser ( FWidget* parent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FFileDialog::adjustSize() void FFileDialog::adjustSize()
{ {
int h, X, Y, max_width, max_height; int h
, X
, Y
, max_width
, max_height;
FWidget* root_widget = getRootWidget(); FWidget* root_widget = getRootWidget();
if ( root_widget ) if ( root_widget )

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/flabel.h" #include "final/flabel.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/flineedit.h" #include "final/flineedit.h"
@ -330,7 +348,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev)
cursor_pos--; cursor_pos--;
if ( cursor_pos < 0 ) if ( cursor_pos < 0 )
cursor_pos=0; cursor_pos = 0;
if ( cursor_pos < text_offset ) if ( cursor_pos < text_offset )
text_offset--; text_offset--;
@ -342,7 +360,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev)
cursor_pos++; cursor_pos++;
if ( cursor_pos >= len ) if ( cursor_pos >= len )
cursor_pos=len; cursor_pos = len;
if ( cursor_pos - text_offset >= getWidth() - 2 if ( cursor_pos - text_offset >= getWidth() - 2
&& text_offset <= len - getWidth() + 1 ) && text_offset <= len - getWidth() + 1 )
@ -352,13 +370,13 @@ void FLineEdit::onKeyPress (FKeyEvent* ev)
break; break;
case fc::Fkey_home: case fc::Fkey_home:
cursor_pos=0; cursor_pos = 0;
text_offset=0; text_offset = 0;
ev->accept(); ev->accept();
break; break;
case fc::Fkey_end: case fc::Fkey_end:
cursor_pos=len; cursor_pos = len;
if ( cursor_pos >= getWidth() - 1 ) if ( cursor_pos >= getWidth() - 1 )
text_offset = len - getWidth() + 2; text_offset = len - getWidth() + 2;
ev->accept(); ev->accept();
@ -372,7 +390,7 @@ void FLineEdit::onKeyPress (FKeyEvent* ev)
} }
if ( cursor_pos >= len ) if ( cursor_pos >= len )
cursor_pos=len; cursor_pos = len;
if ( cursor_pos < 0 ) if ( cursor_pos < 0 )
cursor_pos = 0; cursor_pos = 0;
@ -530,7 +548,7 @@ void FLineEdit::onMouseMove (FMouseEvent* ev)
cursor_pos = text_offset + mouse_x - 2; cursor_pos = text_offset + mouse_x - 2;
if ( cursor_pos >= len ) if ( cursor_pos >= len )
cursor_pos=len; cursor_pos = len;
drawInputField(); drawInputField();
updateTerminal(); updateTerminal();

View File

@ -1,6 +1,23 @@
// File: flistbox.cpp /************************************************************************
// Provides: class FListBoxItem * flistbox.cpp - Widget FListBox and FListBoxItem *
// class FListBox * *
* 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <algorithm> #include <algorithm>
@ -406,13 +423,14 @@ void FListBox::clear()
void FListBox::onKeyPress (FKeyEvent* ev) void FListBox::onKeyPress (FKeyEvent* ev)
{ {
static const int padding_space = 2; // 1 leading space + 1 tailing space static const int padding_space = 2; // 1 leading space + 1 tailing space
int element_count = int(getCount()); int element_count = int(getCount())
int current_before = current; , current_before = current
int xoffset_before = xoffset; , xoffset_before = xoffset
int xoffset_end = max_line_width - getClientWidth() + padding_space; , xoffset_end = max_line_width - getClientWidth() + padding_space
int yoffset_before = yoffset; , yoffset_before = yoffset
int yoffset_end = element_count - getClientHeight(); , yoffset_end = element_count - getClientHeight()
int key = ev->key(); , pagesize = getClientHeight() - 1
, key = ev->key();
switch ( key ) switch ( key )
{ {
@ -427,7 +445,7 @@ void FListBox::onKeyPress (FKeyEvent* ev)
current--; current--;
if ( current < 1 ) if ( current < 1 )
current=1; current = 1;
if ( current <= yoffset ) if ( current <= yoffset )
yoffset--; yoffset--;
@ -473,17 +491,17 @@ void FListBox::onKeyPress (FKeyEvent* ev)
break; break;
case fc::Fkey_ppage: case fc::Fkey_ppage:
current -= getClientHeight() - 1; current -= pagesize;
if ( current < 1 ) if ( current < 1 )
current=1; current = 1;
if ( current <= yoffset ) if ( current <= yoffset )
{ {
yoffset -= getClientHeight() - 1; yoffset -= pagesize;
if ( yoffset < 0 ) if ( yoffset < 0 )
yoffset=0; yoffset = 0;
} }
inc_search.clear(); inc_search.clear();
@ -491,14 +509,14 @@ void FListBox::onKeyPress (FKeyEvent* ev)
break; break;
case fc::Fkey_npage: case fc::Fkey_npage:
current += getClientHeight() - 1; current += pagesize;
if ( current > element_count ) if ( current > element_count )
current = element_count; current = element_count;
if ( current - yoffset > getClientHeight() ) if ( current - yoffset > getClientHeight() )
{ {
yoffset += getClientHeight() - 1; yoffset += pagesize;
if ( yoffset > yoffset_end ) if ( yoffset > yoffset_end )
yoffset = yoffset_end; yoffset = yoffset_end;
@ -710,7 +728,9 @@ void FListBox::onKeyPress (FKeyEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListBox::onMouseDown (FMouseEvent* 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 if ( ev->getButton() != fc::LeftButton
&& ev->getButton() != fc::RightButton ) && ev->getButton() != fc::RightButton )
@ -811,7 +831,10 @@ void FListBox::onMouseUp (FMouseEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListBox::onMouseMove (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 if ( ev->getButton() != fc::LeftButton
&& ev->getButton() != fc::RightButton ) && ev->getButton() != fc::RightButton )
@ -966,10 +989,10 @@ void FListBox::onMouseDoubleClick (FMouseEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListBox::onTimer (FTimerEvent*) void FListBox::onTimer (FTimerEvent*)
{ {
int element_count = int(getCount()); int element_count = int(getCount())
int current_before = current; , current_before = current
int yoffset_before = yoffset; , yoffset_before = yoffset
int yoffset_end = element_count - getClientHeight(); , yoffset_end = element_count - getClientHeight();
switch ( int(drag_scroll) ) switch ( int(drag_scroll) )
{ {
@ -978,7 +1001,7 @@ void FListBox::onTimer (FTimerEvent*)
case fc::scrollUp: case fc::scrollUp:
case fc::scrollUpSelect: case fc::scrollUpSelect:
if ( current_before == 1) if ( current_before == 1 )
{ {
drag_scroll = fc::noScroll; drag_scroll = fc::noScroll;
return; return;
@ -987,13 +1010,13 @@ void FListBox::onTimer (FTimerEvent*)
current -= scroll_distance; current -= scroll_distance;
if ( current < 1 ) if ( current < 1 )
current=1; current = 1;
if ( current <= yoffset ) if ( current <= yoffset )
yoffset -= scroll_distance; yoffset -= scroll_distance;
if ( yoffset < 0 ) if ( yoffset < 0 )
yoffset=0; yoffset = 0;
break; break;
case fc::scrollDown: case fc::scrollDown:
@ -1040,7 +1063,7 @@ void FListBox::onTimer (FTimerEvent*)
to = current; to = current;
} }
for (int i=from; i <= to; i++) for (int i = from; i <= to; i++)
{ {
if ( mouse_select ) if ( mouse_select )
{ {
@ -1073,11 +1096,12 @@ void FListBox::onTimer (FTimerEvent*)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListBox::onWheel (FWheelEvent* ev) void FListBox::onWheel (FWheelEvent* ev)
{ {
int element_count, current_before, yoffset_before, yoffset_end, wheel; int wheel
element_count = int(getCount()); , element_count = int(getCount())
current_before = current; , current_before = current
yoffset_before = yoffset; , yoffset_before = yoffset
yoffset_end = element_count - getClientHeight(); , yoffset_end = element_count - getClientHeight()
, pagesize = 4;
if ( yoffset_end < 0 ) if ( yoffset_end < 0 )
yoffset_end = 0; yoffset_end = 0;
@ -1098,18 +1122,18 @@ void FListBox::onWheel (FWheelEvent* ev)
if ( yoffset == 0 ) if ( yoffset == 0 )
break; break;
yoffset -= 4; yoffset -= pagesize;
if ( yoffset < 0 ) if ( yoffset < 0 )
{ {
current -= 4 + yoffset; current -= pagesize + yoffset;
yoffset=0; yoffset = 0;
} }
else else
current -= 4; current -= pagesize;
if ( current < 1 ) if ( current < 1 )
current=1; current = 1;
inc_search.clear(); inc_search.clear();
break; break;
@ -1118,15 +1142,15 @@ void FListBox::onWheel (FWheelEvent* ev)
if ( yoffset == yoffset_end ) if ( yoffset == yoffset_end )
break; break;
yoffset += 4; yoffset += pagesize;
if ( yoffset > yoffset_end ) if ( yoffset > yoffset_end )
{ {
current += 4 - (yoffset - yoffset_end); current += pagesize - (yoffset - yoffset_end);
yoffset = yoffset_end; yoffset = yoffset_end;
} }
else else
current += 4; current += pagesize;
if ( current > element_count ) if ( current > element_count )
current = element_count; current = element_count;
@ -1187,6 +1211,9 @@ void FListBox::adjustYOffset()
{ {
int element_count = int(getCount()); int element_count = int(getCount());
if ( element_count == 0 )
return;
if ( yoffset > element_count - getClientHeight() ) if ( yoffset > element_count - getClientHeight() )
yoffset = element_count - getClientHeight(); yoffset = element_count - getClientHeight();
@ -1402,10 +1429,10 @@ void FListBox::drawList()
for (uInt y = start; y < num; y++) for (uInt y = start; y < num; y++)
{ {
bool serach_mark = false; bool serach_mark = false
bool lineHasBrackets = hasBrackets(iter); , lineHasBrackets = hasBrackets(iter)
bool isLineSelected = isSelected(iter); , isLineSelected = isSelected(iter)
bool isCurrentLine = bool(y + uInt(yoffset) + 1 == uInt(current)); , isCurrentLine = bool(y + uInt(yoffset) + 1 == uInt(current));
if ( conv_type == lazy_convert && iter->getText().isNull() ) if ( conv_type == lazy_convert && iter->getText().isNull() )
{ {
@ -1497,13 +1524,13 @@ void FListBox::drawList()
if ( lineHasBrackets ) if ( lineHasBrackets )
{ {
int full_length; int full_length;
uInt len; uInt len
uInt i = 0; , i = 0
uInt b = 0; , b = 0;
if ( xoffset == 0 ) if ( xoffset == 0 )
{ {
b=1; b = 1;
switch ( iter->brackets ) switch ( iter->brackets )
{ {
@ -1690,10 +1717,10 @@ void FListBox::processChanged()
void FListBox::cb_VBarChange (FWidget*, data_ptr) void FListBox::cb_VBarChange (FWidget*, data_ptr)
{ {
FScrollbar::sType scrollType; FScrollbar::sType scrollType;
int distance = 1; int distance = 1
int element_count = int(getCount()); , element_count = int(getCount())
int yoffset_before = yoffset; , yoffset_before = yoffset
int yoffset_end = element_count - getClientHeight(); , yoffset_end = element_count - getClientHeight();
scrollType = vbar->getScrollType(); scrollType = vbar->getScrollType();
switch ( scrollType ) switch ( scrollType )
@ -1708,7 +1735,7 @@ void FListBox::cb_VBarChange (FWidget*, data_ptr)
current -= distance; current -= distance;
if ( current < 1 ) if ( current < 1 )
current=1; current = 1;
if ( current <= yoffset ) if ( current <= yoffset )
yoffset -= distance; 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 static const int padding_space = 2; // 1 leading space + 1 tailing space
FScrollbar::sType scrollType; FScrollbar::sType scrollType;
int distance = 1; int distance = 1
int xoffset_before = xoffset; , pagesize = 4
int xoffset_end = max_line_width - getClientWidth() + padding_space; , xoffset_before = xoffset
, xoffset_end = max_line_width - getClientWidth() + padding_space;
scrollType = hbar->getScrollType(); scrollType = hbar->getScrollType();
switch ( scrollType ) switch ( scrollType )
@ -1854,7 +1882,7 @@ void FListBox::cb_HBarChange (FWidget*, data_ptr)
if ( xoffset == 0 ) if ( xoffset == 0 )
break; break;
xoffset -= 4; xoffset -= pagesize;
if ( xoffset < 0 ) if ( xoffset < 0 )
xoffset = 0; xoffset = 0;
@ -1865,7 +1893,7 @@ void FListBox::cb_HBarChange (FWidget*, data_ptr)
if ( xoffset == xoffset_end ) if ( xoffset == xoffset_end )
break; break;
xoffset += 4; xoffset += pagesize;
if ( xoffset > xoffset_end ) if ( xoffset > xoffset_end )
xoffset = xoffset_end; xoffset = xoffset_end;

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <vector> #include <vector>
@ -305,12 +323,11 @@ void FMenu::onMouseDown (FMouseEvent* ev)
while ( iter != last ) while ( iter != last )
{ {
int x1, x2, y, mouse_x, mouse_y; int x1 = (*iter)->getX()
x1 = (*iter)->getX(); , x2 = (*iter)->getX() + (*iter)->getWidth()
x2 = (*iter)->getX() + (*iter)->getWidth(); , y = (*iter)->getY()
y = (*iter)->getY(); , mouse_x = mouse_pos.getX()
mouse_x = mouse_pos.getX(); , mouse_y = mouse_pos.getY();
mouse_y = mouse_pos.getY();
if ( mouse_x >= x1 if ( mouse_x >= x1
&& mouse_x < x2 && mouse_x < x2
@ -410,10 +427,9 @@ void FMenu::onMouseUp (FMouseEvent* ev)
while ( iter != last ) while ( iter != last )
{ {
int x1, x2, y; int x1 = (*iter)->getX()
x1 = (*iter)->getX(); , x2 = (*iter)->getX() + (*iter)->getWidth()
x2 = (*iter)->getX() + (*iter)->getWidth(); , y = (*iter)->getY();
y = (*iter)->getY();
if ( (*iter)->isSelected() ) if ( (*iter)->isSelected() )
{ {
@ -482,12 +498,12 @@ void FMenu::onMouseMove (FMouseEvent* ev)
{ {
std::vector<FMenuItem*>::const_iterator iter, last; std::vector<FMenuItem*>::const_iterator iter, last;
FMenu* smenu = 0; FMenu* smenu = 0;
bool focus_changed = false; bool focus_changed = false
bool mouse_over_menu = false; , mouse_over_menu = false
bool mouse_over_submenu = false; , mouse_over_submenu = false
bool mouse_over_supermenu = false; , mouse_over_supermenu = false
bool mouse_over_menubar = false; , mouse_over_menubar = false
bool hide_sub_menu = false; , hide_sub_menu = false;
FMenu* show_sub_menu = 0; FMenu* show_sub_menu = 0;
FPoint mouse_pos; FPoint mouse_pos;
@ -523,12 +539,11 @@ void FMenu::onMouseMove (FMouseEvent* ev)
while ( iter != last ) while ( iter != last )
{ {
int x1, x2, y, mouse_x, mouse_y; int x1 = (*iter)->getX()
x1 = (*iter)->getX(); , x2 = (*iter)->getX() + (*iter)->getWidth()
x2 = (*iter)->getX() + (*iter)->getWidth(); , y = (*iter)->getY()
y = (*iter)->getY(); , mouse_x = mouse_pos.getX()
mouse_x = mouse_pos.getX(); , mouse_y = mouse_pos.getY();
mouse_y = mouse_pos.getY();
if ( mouse_x >= x1 if ( mouse_x >= x1
&& mouse_x < x2 && mouse_x < x2
@ -814,7 +829,9 @@ void FMenu::init(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMenu::calculateDimensions() void FMenu::calculateDimensions()
{ {
int item_X, item_Y, adjust_X; int item_X
, item_Y
, adjust_X;
std::vector<FMenuItem*>::const_iterator iter, last; std::vector<FMenuItem*>::const_iterator iter, last;
iter = item_list.begin(); iter = item_list.begin();
last = item_list.end(); last = item_list.end();
@ -1261,14 +1278,14 @@ void FMenu::drawItems()
FString txt; FString txt;
uInt txt_length; uInt txt_length;
int hotkeypos, to_char; int hotkeypos, to_char;
int accel_key = (*iter)->accel_key; int accel_key = (*iter)->accel_key;
bool has_menu = (*iter)->hasMenu(); bool has_menu = (*iter)->hasMenu()
bool is_enabled = (*iter)->isEnabled(); , is_enabled = (*iter)->isEnabled()
bool is_checked = (*iter)->isChecked(); , is_checked = (*iter)->isChecked()
bool is_checkable = (*iter)->checkable; , is_checkable = (*iter)->checkable
bool is_radio_btn = (*iter)->radio_button; , is_radio_btn = (*iter)->radio_button
bool is_selected = (*iter)->isSelected(); , is_selected = (*iter)->isSelected()
bool is_noUnderline = (((*iter)->getFlags() & fc::no_underline) != 0); , is_noUnderline = (((*iter)->getFlags() & fc::no_underline) != 0);
if ( is_enabled ) if ( is_enabled )
{ {

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <vector> #include <vector>
@ -779,8 +797,12 @@ void FMenuBar::drawItems()
wchar_t* item_text; wchar_t* item_text;
FString txt; FString txt;
uInt txt_length; uInt txt_length;
int hotkeypos, startpos, to_char; int hotkeypos
bool is_active, is_selected, is_noUnderline; , startpos
, to_char;
bool is_active
, is_selected
, is_noUnderline;
startpos = x + 1; startpos = x + 1;
is_active = (*iter)->isEnabled(); is_active = (*iter)->isEnabled();

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/fdialog.h" #include "final/fdialog.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <vector> #include <vector>
#include "final/fmenulist.h" #include "final/fmenulist.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FMenuList // class FMenuList
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <algorithm> #include <algorithm>
@ -259,7 +277,10 @@ int FMessageBox::error ( FWidget* parent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMessageBox::adjustSize() void FMessageBox::adjustSize()
{ {
int X, Y, max_width, max_height; int X
, Y
, max_width
, max_height;
FWidget* root_widget = getRootWidget(); FWidget* root_widget = getRootWidget();
if ( root_widget ) if ( root_widget )

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fobject.h" #include "final/fobject.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <cstring> #include <cstring>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <cstring> #include <cstring>
@ -473,9 +491,9 @@ char* FOptiMove::moveCursor (int xold, int yold, int xnew, int ynew)
char* null_ptr = null_result; char* null_ptr = null_result;
char* move_ptr = move_buf; char* move_ptr = move_buf;
char* move_xy; char* move_xy;
int method = 0; int method = 0
int new_time; , new_time
int move_time = LONG_DURATION; , move_time = LONG_DURATION;
// Method 0: direct cursor addressing // Method 0: direct cursor addressing
move_xy = tgoto(F_cursor_address.cap, xnew, ynew); 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 // check for delay with padding character
if ( p[0] == '$' && p[1] == '<' && std::strchr(p, '>') ) if ( p[0] == '$' && p[1] == '<' && std::strchr(p, '>') )
{ {
float num=0; float num = 0;
for (p += 2; *p != '>'; p++) for (p += 2; *p != '>'; p++)
{ {
@ -763,9 +781,9 @@ int FOptiMove::relativeMove ( char*& move
, int from_x, int from_y , int from_x, int from_y
, int to_x, int to_y ) , int to_x, int to_y )
{ {
int num; int num
int vtime = 0; , vtime = 0
int htime = 0; , htime = 0;
if ( move ) if ( move )
move[0] = '\0'; move[0] = '\0';

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fpoint.h" #include "final/fpoint.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fprogressbar.h" #include "final/fprogressbar.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FProgressbar // class FProgressbar
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fapplication.h" #include "final/fapplication.h"
#include "final/fradiobutton.h" #include "final/fradiobutton.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fradiomenuitem.h" #include "final/fradiomenuitem.h"
#include "final/fmenu.h" #include "final/fmenu.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FRadioMenuItem // class FRadioMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <algorithm> #include <algorithm>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <algorithm> #include <algorithm>
#include "final/fscrollbar.h" #include "final/fscrollbar.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FScrollbar // class FScrollbar
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -27,7 +46,7 @@ FScrollbar::FScrollbar(FWidget* parent)
, min(0) , min(0)
, max(99) , max(99)
, steps(1) , steps(1)
, pageSize(0) , pagesize(0)
, length(20) , length(20)
, bar_orientation(fc::vertical) , bar_orientation(fc::vertical)
, max_color(getMaxColor()) , max_color(getMaxColor())
@ -54,7 +73,7 @@ FScrollbar::FScrollbar(int o, FWidget* parent)
, min(0) , min(0)
, max(99) , max(99)
, steps(1) , steps(1)
, pageSize(0) , pagesize(0)
, length(20) , length(20)
, bar_orientation(fc::vertical) , bar_orientation(fc::vertical)
, max_color(getMaxColor()) , max_color(getMaxColor())
@ -108,8 +127,8 @@ void FScrollbar::setSteps (double st)
else else
steps = st; steps = st;
if ( pageSize == 0 ) if ( pagesize == 0 )
pageSize = int(double(max)/steps); pagesize = int(double(max)/steps);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -117,12 +136,12 @@ void FScrollbar::setPageSize (int document_size, int page_size)
{ {
if ( page_size == 0 ) if ( page_size == 0 )
{ {
pageSize = document_size; pagesize = document_size;
steps = 1.0; steps = 1.0;
} }
else else
{ {
pageSize = page_size; pagesize = page_size;
steps = double(double(document_size) / double(page_size)); steps = double(double(document_size) / double(page_size));
} }
} }

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fscrollview.h" #include "final/fscrollview.h"
#include "final/fwindow.h" #include "final/fwindow.h"
@ -96,7 +115,8 @@ void FScrollView::setScrollHeight (int height)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FScrollView::setScrollSize (int width, int height) void FScrollView::setScrollSize (int width, int height)
{ {
int xoffset_end, yoffset_end; int xoffset_end
, yoffset_end;
if ( width < getViewportWidth() ) if ( width < getViewportWidth() )
width = getViewportWidth(); width = getViewportWidth();
@ -506,7 +526,7 @@ void FScrollView::onWheel (FWheelEvent* ev)
yoffset -= 4; yoffset -= 4;
if ( yoffset < 0 ) if ( yoffset < 0 )
yoffset=0; yoffset = 0;
break; break;
@ -588,11 +608,12 @@ void FScrollView::onChildFocusIn (FFocusEvent*)
if ( ! vp_geometry.contains(widget_geometry) ) if ( ! vp_geometry.contains(widget_geometry) )
{ {
int x, y; int x
int vx = vp_geometry.getX(); , y
int vy = vp_geometry.getY(); , vx = vp_geometry.getX()
int wx = widget_geometry.getX(); , vy = vp_geometry.getY()
int wy = widget_geometry.getY(); , wx = widget_geometry.getX()
, wy = widget_geometry.getY();
if ( wx > vx ) if ( wx > vx )
x = widget_geometry.getX2() - vp_geometry.getWidth() + 1; x = widget_geometry.getX2() - vp_geometry.getWidth() + 1;
@ -659,10 +680,10 @@ FVTerm::term_area* FScrollView::getPrintArea()
void FScrollView::adjustSize() void FScrollView::adjustSize()
{ {
FWidget::adjustSize(); FWidget::adjustSize();
int width = getWidth(); int width = getWidth()
int height = getHeight(); , height = getHeight()
int xoffset = viewport_geometry.getX(); , xoffset = viewport_geometry.getX()
int yoffset = viewport_geometry.getY(); , yoffset = viewport_geometry.getY();
scroll_geometry.setPos ( getTermX() + getLeftPadding() - 1 scroll_geometry.setPos ( getTermX() + getLeftPadding() - 1
, getTermY() + getTopPadding() - 1 ); , getTermY() + getTopPadding() - 1 );
@ -695,8 +716,6 @@ void FScrollView::copy2area()
{ {
// copy viewport to area // copy viewport to area
int ax, ay, dx, dy, y_end, x_end;
if ( ! hasPrintArea() ) if ( ! hasPrintArea() )
FVTerm::getPrintArea(); FVTerm::getPrintArea();
@ -706,12 +725,12 @@ void FScrollView::copy2area()
if ( ! viewport->has_changes ) if ( ! viewport->has_changes )
return; return;
ax = getTermX() - print_area->offset_left; int ax = getTermX() - print_area->offset_left
ay = getTermY() - print_area->offset_top; , ay = getTermY() - print_area->offset_top
dx = viewport_geometry.getX(); , dx = viewport_geometry.getX()
dy = viewport_geometry.getY(); , dy = viewport_geometry.getY()
y_end = getViewportHeight(); , y_end = getViewportHeight()
x_end = getViewportWidth(); , x_end = getViewportWidth();
for (int y = 0; y < y_end; y++) // line loop for (int y = 0; y < y_end; y++) // line loop
{ {
@ -744,11 +763,11 @@ inline FPoint FScrollView::getViewportCursorPos()
if ( window ) if ( window )
{ {
int widget_offsetX = getTermX() - window->getTermX(); int widget_offsetX = getTermX() - window->getTermX()
int widget_offsetY = getTermY() - window->getTermY(); , widget_offsetY = getTermY() - window->getTermY()
int x = widget_offsetX + viewport->input_cursor_x , x = widget_offsetX + viewport->input_cursor_x
- viewport_geometry.getX(); - viewport_geometry.getX()
int y = widget_offsetY + viewport->input_cursor_y , y = widget_offsetY + viewport->input_cursor_y
- viewport_geometry.getY(); - viewport_geometry.getY();
return FPoint (x, y); return FPoint (x, y);
} }
@ -759,7 +778,8 @@ inline FPoint FScrollView::getViewportCursorPos()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FScrollView::init (FWidget* parent) void FScrollView::init (FWidget* parent)
{ {
int xoffset_end, yoffset_end; int xoffset_end
, yoffset_end;
assert ( parent != 0 ); assert ( parent != 0 );
assert ( ! parent->isInstanceOf("FScrollView") ); assert ( ! parent->isInstanceOf("FScrollView") );
@ -974,7 +994,7 @@ void FScrollView::cb_VBarChange (FWidget*, data_ptr)
yoffset -= 4; yoffset -= 4;
if ( yoffset < 0 ) if ( yoffset < 0 )
yoffset=0; yoffset = 0;
break; break;
@ -1082,7 +1102,7 @@ void FScrollView::cb_HBarChange (FWidget*, data_ptr)
xoffset -= 4; xoffset -= 4;
if ( xoffset < 0 ) if ( xoffset < 0 )
xoffset=0; xoffset = 0;
break; break;

View File

@ -1,11 +1,29 @@
// File: fstatusbar.cpp /************************************************************************
// Provides: class FStatusKey * fstatusbar.cpp - Widget FStatusBar and FStatusKey *
// class FStatusBar * *
* 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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <vector> #include <vector>
#include "final/fstatusbar.h" #include "final/fstatusbar.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FStatusKey // class FStatusKey
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -206,7 +224,7 @@ void FStatusBar::hide()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FStatusBar::drawMessage() void FStatusBar::drawMessage()
{ {
int termWidth, space_offset; int termWidth, space_offset;
bool isLastActiveFocus, hasKeys; bool isLastActiveFocus, hasKeys;
if ( ! (isVisible() ) ) if ( ! (isVisible() ) )
@ -377,14 +395,12 @@ void FStatusBar::onMouseDown (FMouseEvent* ev)
while ( iter != last ) while ( iter != last )
{ {
int x1, x2, mouse_x, mouse_y, kname_len, txt_length; int x1 = X
, kname_len = int(getKeyName((*iter)->getKey()).getLength())
x1 = X; , txt_length = int((*iter)->getText().getLength())
kname_len = int(getKeyName((*iter)->getKey()).getLength()); , x2 = x1 + kname_len + txt_length + 1
txt_length = int((*iter)->getText().getLength()); , mouse_x = ev->getX()
x2 = x1 + kname_len + txt_length + 1; , mouse_y = ev->getY();
mouse_x = ev->getX();
mouse_y = ev->getY();
if ( mouse_x >= x1 if ( mouse_x >= x1
&& mouse_x <= x2 && mouse_x <= x2
@ -423,11 +439,10 @@ void FStatusBar::onMouseUp (FMouseEvent* ev)
while ( iter != last ) while ( iter != last )
{ {
int x1, x2, kname_len, txt_length; int x1 = X
x1 = X; , kname_len = int(getKeyName((*iter)->getKey()).getLength())
kname_len = int(getKeyName((*iter)->getKey()).getLength()); , txt_length = int((*iter)->getText().getLength())
txt_length = int((*iter)->getText().getLength()); , x2 = x1 + kname_len + txt_length + 1;
x2 = x1 + kname_len + txt_length + 1;
if ( (*iter)->hasMouseFocus() ) if ( (*iter)->hasMouseFocus() )
{ {
@ -470,13 +485,12 @@ void FStatusBar::onMouseMove (FMouseEvent* ev)
while ( iter != last ) while ( iter != last )
{ {
int x1, x2, mouse_x, mouse_y, kname_len, txt_length; int x1 = X
x1 = X; , kname_len = int(getKeyName((*iter)->getKey()).getLength())
kname_len = int(getKeyName((*iter)->getKey()).getLength()); , txt_length = int((*iter)->getText().getLength())
txt_length = int((*iter)->getText().getLength()); , x2 = x1 + kname_len + txt_length + 1
x2 = x1 + kname_len + txt_length + 1; , mouse_x = ev->getX()
mouse_x = ev->getX(); , mouse_y = ev->getY();
mouse_y = ev->getY();
if ( mouse_x >= x1 if ( mouse_x >= x1
&& mouse_x <= x2 && mouse_x <= x2

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
@ -953,7 +971,7 @@ uLong FString::toULong() const
throw std::overflow_error ("overflow"); throw std::overflow_error ("overflow");
} }
num = (num<<3)+(num<<1) + d; // (10 * num) + d num = (num << 3) + (num << 1) + d; // (10 * num) + d
p++; 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 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; const wchar_t* src;
if ( ! s ) // handle NULL string 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 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; const char* src;
wchar_t* dest; wchar_t* dest;

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fswitch.h" #include "final/fswitch.h"

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <algorithm> #include <algorithm>
#include <map> #include <map>
@ -213,7 +231,7 @@ FTerm::modifier_key& FTerm::getLinuxModifierKey()
// fill bit field with 0 // fill bit field with 0
std::memset (&mod_key, 0x00, sizeof(mod_key)); std::memset (&mod_key, 0x00, sizeof(mod_key));
// TIOCLINUX, subcode=6 // TIOCLINUX, subcode = 6
if ( ioctl(0, TIOCLINUX, &subcode) >= 0 ) if ( ioctl(0, TIOCLINUX, &subcode) >= 0 )
{ {
if ( subcode & (1 << KG_SHIFT) ) if ( subcode & (1 << KG_SHIFT) )
@ -1325,12 +1343,11 @@ void FTerm::setPalette (short index, int r, int g, int b)
if ( Ic || Ip ) if ( Ic || Ip )
{ {
int rr, gg, bb;
const char* color_str = ""; const char* color_str = "";
rr = (r * 1001) / 256; int rr = (r * 1001) / 256
gg = (g * 1001) / 256; , gg = (g * 1001) / 256
bb = (b * 1001) / 256; , bb = (b * 1001) / 256;
if ( Ic ) if ( Ic )
color_str = tparm(Ic, index, rr, gg, bb, 0, 0, 0, 0, 0); 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 = ""; FString sec_da_str = "";
int a=0, b=0, c=0; int a = 0
, b = 0
, c = 0;
fd_set ifds; fd_set ifds;
struct timeval tv; struct timeval tv;
@ -2032,18 +2051,15 @@ int FTerm::getFramebuffer_bpp ()
return -1; 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) ::close(fd);
&& ! ioctl(fd, FBIOGET_FSCREENINFO, &fb_fix) ) return int(fb_var.bits_per_pixel);
{ }
::close(fd); else
return int(fb_var.bits_per_pixel); {
} ::close(fd);
else
{
::close(fd);
}
} }
return -1; return -1;
@ -2272,7 +2288,7 @@ int FTerm::setScreenFont ( uChar* fontdata, uInt count
} }
for (uInt i = 0; i < count; i++) for (uInt i = 0; i < count; i++)
std::memcpy ( const_cast<uChar*>(font.data + bytes_per_line*32*i) std::memcpy ( const_cast<uChar*>(font.data + bytes_per_line * 32 * i)
, &fontdata[i * font.height] , &fontdata[i * font.height]
, font.height); , font.height);
} }
@ -3004,11 +3020,12 @@ void FTerm::init_termcaps()
* captoinfo - convert all termcap descriptions into terminfo descriptions * captoinfo - convert all termcap descriptions into terminfo descriptions
* infocmp - print out terminfo description from the current terminal * infocmp - print out terminfo description from the current terminal
*/ */
static const int success = 1; static const int
static const int no_entry = 0; success = 1
static const int db_not_found = -1; , no_entry = 0
static const int not_available = -1; , db_not_found = -1
static const int uninitialized = -2; , not_available = -1
, uninitialized = -2;
static char term_buffer[2048]; static char term_buffer[2048];
static char string_buf[2048]; static char string_buf[2048];
char* buffer = string_buf; char* buffer = string_buf;
@ -3976,7 +3993,7 @@ void FTerm::init()
setPalette (fc::Black, 0x00, 0x00, 0x00); setPalette (fc::Black, 0x00, 0x00, 0x00);
setPalette (fc::Blue, 0x22, 0x22, 0xb2); 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::Cyan, 0x4a, 0x4a, 0xe4);
setPalette (fc::Red, 0xb2, 0x18, 0x18); setPalette (fc::Red, 0xb2, 0x18, 0x18);
setPalette (fc::Magenta, 0xb2, 0x18, 0xb2); setPalette (fc::Magenta, 0xb2, 0x18, 0xb2);

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -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 <http://www.gnu.org/licenses/>. *
************************************************************************/
#include "final/fdialog.h" #include "final/fdialog.h"
#include "final/fstatusbar.h" #include "final/fstatusbar.h"
@ -427,9 +445,12 @@ void FTextView::onMouseDown (FMouseEvent* ev)
parent = getParentWidget(); parent = getParentWidget();
if ( parent if ( ! parent )
&& parent->isDialogWidget() return;
&& (dialog = static_cast<FDialog*>(parent)) != 0
dialog = static_cast<FDialog*>(parent);
if ( parent->isDialogWidget()
&& dialog->isResizeable() && dialog->isResizeable()
&& ! dialog->isZoomed() ) && ! dialog->isZoomed() )
{ {
@ -455,28 +476,28 @@ void FTextView::onMouseDown (FMouseEvent* ev)
void FTextView::onMouseUp (FMouseEvent* ev) void FTextView::onMouseUp (FMouseEvent* ev)
{ {
FWidget* parent = getParentWidget(); FWidget* parent = getParentWidget();
FDialog* dialog;
if ( parent if ( parent && parent->isDialogWidget() )
&& parent->isDialogWidget()
&& (dialog = static_cast<FDialog*>(parent)) != 0
&& dialog->isResizeable()
&& ! dialog->isZoomed() )
{ {
int b = ev->getButton(); FDialog* dialog = static_cast<FDialog*>(parent);
const FPoint& tp = ev->getTermPos();
const FPoint& p = parent->termToWidgetPos(tp);
parent->setFocus();
try if ( dialog->isResizeable() && ! dialog->isZoomed() )
{ {
FMouseEvent* _ev = new FMouseEvent (fc::MouseUp_Event, p, tp, b); int b = ev->getButton();
FApplication::sendEvent (parent, _ev); const FPoint& tp = ev->getTermPos();
delete _ev; const FPoint& p = parent->termToWidgetPos(tp);
} parent->setFocus();
catch (const std::bad_alloc& ex)
{ try
std::cerr << "not enough memory to alloc " << ex.what() << std::endl; {
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) void FTextView::onMouseMove (FMouseEvent* ev)
{ {
FWidget* parent = getParentWidget(); FWidget* parent = getParentWidget();
FDialog* dialog;
if ( parent if ( parent && parent->isDialogWidget() )
&& parent->isDialogWidget()
&& (dialog = static_cast<FDialog*>(parent)) != 0
&& dialog->isResizeable()
&& ! dialog->isZoomed() )
{ {
int b = ev->getButton(); FDialog* dialog = static_cast<FDialog*>(parent);
const FPoint& tp = ev->getTermPos();
const FPoint& p = parent->termToWidgetPos(tp);
parent->setFocus();
try if ( dialog->isResizeable() && ! dialog->isZoomed() )
{ {
FMouseEvent* _ev = new FMouseEvent (fc::MouseMove_Event, p, tp, b); int b = ev->getButton();
FApplication::sendEvent (parent, _ev); const FPoint& tp = ev->getTermPos();
delete _ev; const FPoint& p = parent->termToWidgetPos(tp);
} parent->setFocus();
catch (const std::bad_alloc& ex)
{ try
std::cerr << "not enough memory to alloc " << ex.what() << std::endl; {
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; yoffset -= 4;
if ( yoffset < 0 ) if ( yoffset < 0 )
yoffset=0; yoffset = 0;
break; break;
@ -596,10 +617,10 @@ void FTextView::onFocusOut (FFocusEvent*)
void FTextView::adjustSize() void FTextView::adjustSize()
{ {
FWidget::adjustSize(); FWidget::adjustSize();
int width = getWidth(); int width = getWidth()
int height = getHeight(); , height = getHeight()
int last_line = int(getRows()); , last_line = int(getRows())
int max_width = int(maxLineWidth); , max_width = int(maxLineWidth);
if ( xoffset >= max_width - width - nf_offset ) if ( xoffset >= max_width - width - nf_offset )
xoffset = max_width - width - nf_offset - 1; xoffset = max_width - width - nf_offset - 1;
@ -800,10 +821,10 @@ void FTextView::processChanged()
void FTextView::cb_VBarChange (FWidget*, data_ptr) void FTextView::cb_VBarChange (FWidget*, data_ptr)
{ {
FScrollbar::sType scrollType; FScrollbar::sType scrollType;
int distance = 1; int distance = 1
int last_line = int(getRows()); , last_line = int(getRows())
int yoffset_before = yoffset; , yoffset_before = yoffset
int yoffset_end = last_line - getClientHeight(); , yoffset_end = last_line - getClientHeight();
scrollType = vbar->getScrollType(); scrollType = vbar->getScrollType();
switch ( int(scrollType) ) switch ( int(scrollType) )
@ -891,9 +912,9 @@ void FTextView::cb_VBarChange (FWidget*, data_ptr)
void FTextView::cb_HBarChange (FWidget*, data_ptr) void FTextView::cb_HBarChange (FWidget*, data_ptr)
{ {
FScrollbar::sType scrollType; FScrollbar::sType scrollType;
int distance = 1; int distance = 1
int xoffset_before = xoffset; , xoffset_before = xoffset
int xoffset_end = int(maxLineWidth) - getClientWidth(); , xoffset_end = int(maxLineWidth) - getClientWidth();
scrollType = hbar->getScrollType(); scrollType = hbar->getScrollType();
switch ( scrollType ) switch ( scrollType )
@ -951,7 +972,7 @@ void FTextView::cb_HBarChange (FWidget*, data_ptr)
xoffset -= 4; xoffset -= 4;
if ( xoffset < 0 ) if ( xoffset < 0 )
xoffset=0; xoffset = 0;
break; break;

Some files were not shown because too many files have changed in this diff Show More