Fix scrollview functionality with new inheritance structure
This commit is contained in:
parent
9b47e5c980
commit
b0b44582e8
|
@ -1,3 +1,6 @@
|
||||||
|
2017-10-30 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* Fix scrollview functionality with new inheritance structure
|
||||||
|
|
||||||
2017-10-29 Markus Gans <guru.mail@muenster.de>
|
2017-10-29 Markus Gans <guru.mail@muenster.de>
|
||||||
* Adaptation of the inheritance diagrams in the header files
|
* Adaptation of the inheritance diagrams in the header files
|
||||||
* Add a standardized cb_exitApp callback method to FApplication
|
* Add a standardized cb_exitApp callback method to FApplication
|
||||||
|
|
|
@ -213,9 +213,9 @@ class FVTerm : public FTerm
|
||||||
static void putVTerm();
|
static void putVTerm();
|
||||||
static void updateTerminal (bool);
|
static void updateTerminal (bool);
|
||||||
static void updateTerminal();
|
static void updateTerminal();
|
||||||
void addPreprocessingHandler ( FVTerm*
|
virtual void addPreprocessingHandler ( FVTerm*
|
||||||
, FPreprocessingHandler );
|
, FPreprocessingHandler );
|
||||||
void delPreprocessingHandler (FVTerm*);
|
virtual void delPreprocessingHandler (FVTerm*);
|
||||||
|
|
||||||
int printf (const wchar_t*, ...);
|
int printf (const wchar_t*, ...);
|
||||||
int printf (const char*, ...)
|
int printf (const char*, ...)
|
||||||
|
|
|
@ -114,7 +114,7 @@ class FMenuBar;
|
||||||
#pragma pack(push)
|
#pragma pack(push)
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
class FWidget : public FObject, public FVTerm
|
class FWidget : public FVTerm, public FObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Using-declaration
|
// Using-declaration
|
||||||
|
@ -320,6 +320,9 @@ class FWidget : public FObject, public FVTerm
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
term_area* getPrintArea();
|
term_area* getPrintArea();
|
||||||
|
void addPreprocessingHandler ( FVTerm*
|
||||||
|
, FPreprocessingHandler );
|
||||||
|
void delPreprocessingHandler (FVTerm*);
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isChildPrintArea() const;
|
bool isChildPrintArea() const;
|
||||||
|
|
|
@ -668,7 +668,7 @@ FVTerm::term_area* FScrollView::getPrintArea()
|
||||||
if ( use_own_print_area || ! viewport )
|
if ( use_own_print_area || ! viewport )
|
||||||
{
|
{
|
||||||
child_print_area = 0;
|
child_print_area = 0;
|
||||||
term_area* area = FVTerm::getPrintArea();
|
term_area* area = FWidget::getPrintArea();
|
||||||
child_print_area = viewport;
|
child_print_area = viewport;
|
||||||
return area;
|
return area;
|
||||||
}
|
}
|
||||||
|
@ -717,7 +717,7 @@ void FScrollView::copy2area()
|
||||||
// copy viewport to area
|
// copy viewport to area
|
||||||
|
|
||||||
if ( ! hasPrintArea() )
|
if ( ! hasPrintArea() )
|
||||||
FVTerm::getPrintArea();
|
FWidget::getPrintArea();
|
||||||
|
|
||||||
if ( ! (hasPrintArea() && viewport) )
|
if ( ! (hasPrintArea() && viewport) )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -53,8 +53,8 @@ bool FWidget::hideable;
|
||||||
// constructors and destructor
|
// constructors and destructor
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FWidget::FWidget (FWidget* parent, bool disable_alt_screen)
|
FWidget::FWidget (FWidget* parent, bool disable_alt_screen)
|
||||||
: FObject(parent)
|
: FVTerm(bool(! parent), disable_alt_screen)
|
||||||
, FVTerm(!parent, disable_alt_screen)
|
, FObject(parent)
|
||||||
, accelerator_list(0)
|
, accelerator_list(0)
|
||||||
, flags(0)
|
, flags(0)
|
||||||
, callback_objects()
|
, callback_objects()
|
||||||
|
@ -1767,14 +1767,15 @@ FVTerm::term_area* FWidget::getPrintArea()
|
||||||
return print_area;
|
return print_area;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FWidget* obj = this;
|
FWidget* obj;
|
||||||
FWidget* p_obj = static_cast<FWidget*>(obj->getParent());
|
FWidget* p_obj = this;
|
||||||
|
|
||||||
while ( ! obj->vwin && ! obj->child_print_area && p_obj )
|
do
|
||||||
{
|
{
|
||||||
obj = p_obj;
|
obj = p_obj;
|
||||||
p_obj = static_cast<FWidget*>(p_obj->getParent());
|
p_obj = static_cast<FWidget*>(obj->getParent());
|
||||||
}
|
}
|
||||||
|
while ( ! obj->vwin && ! obj->child_print_area && p_obj );
|
||||||
|
|
||||||
if ( obj->vwin )
|
if ( obj->vwin )
|
||||||
{
|
{
|
||||||
|
@ -1791,6 +1792,25 @@ FVTerm::term_area* FWidget::getPrintArea()
|
||||||
return vdesktop;
|
return vdesktop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FWidget::addPreprocessingHandler ( FVTerm* instance
|
||||||
|
, FPreprocessingHandler handler )
|
||||||
|
{
|
||||||
|
if ( ! print_area )
|
||||||
|
FWidget::getPrintArea();
|
||||||
|
|
||||||
|
FVTerm::addPreprocessingHandler (instance, handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FWidget::delPreprocessingHandler (FVTerm* instance)
|
||||||
|
{
|
||||||
|
if ( ! print_area )
|
||||||
|
FWidget::getPrintArea();
|
||||||
|
|
||||||
|
FVTerm::delPreprocessingHandler (instance);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool FWidget::isChildPrintArea() const
|
bool FWidget::isChildPrintArea() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue