#69216# Enable scroll mice

This commit is contained in:
Gregor Hartmann 2001-05-04 09:51:40 +00:00
parent 6639310b8e
commit 8233e41602
3 changed files with 23 additions and 8 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: appedit.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:12:08 $
* last change: $Author: gh $ $Date: 2001-05-04 10:51:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -117,6 +117,20 @@ AppEdit::~AppEdit()
delete pVScroll;
}
void AppEdit::Command( const CommandEvent& rCEvt )
{
switch( rCEvt.GetCommand() ) {
case COMMAND_WHEEL:
{
HandleScrollCommand( rCEvt, pHScroll, pVScroll );
}
break;
default:
AppWin::Command( rCEvt );
}
}
IMPL_LINK( AppEdit, Scroll, ScrollBar*, pScroll )
{
if ( !pHScroll || !pVScroll )
@ -145,7 +159,7 @@ void AppEdit::InitScrollBars()
Size aOutSz( pTextView->GetWindow()->GetOutputSizePixel() );
pVScroll->SetVisibleSize( aOutSz.Height() );
pVScroll->SetPageSize( aOutSz.Height() * 8 / 10 );
pVScroll->SetLineSize( GetTextHeight() );
pVScroll->SetLineSize( GetTextHeight() +2 ); // +2 is empirical. don't know why
pVScroll->SetThumbPos( pTextView->GetStartDocPos().Y() );
pVScroll->Show();

View file

@ -2,9 +2,9 @@
*
* $RCSfile: appedit.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:12:08 $
* last change: $Author: gh $ $Date: 2001-05-04 10:51:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -89,7 +89,7 @@ public:
FileType GetFileType(); // Liefert den Filetype
virtual long InitMenu( Menu* ); // Initialisierung des Menues
virtual long DeInitMenu( Menu* ); // rücksetzen, so daß wieder alle Shortcuts enabled sind
// long Command( short ); // Kommando-Handler
virtual void Command( const CommandEvent& rCEvt ); // Kommando-Handler
void Resize();
void PostLoad(); // Nachbearbeiten des geladenen (Source am Modul setzen)
void PostSaveAs(); // Nachbearbeiten des Modils ...

View file

@ -2,9 +2,9 @@
*
* $RCSfile: textedit.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: gh $ $Date: 2000-10-24 11:28:10 $
* last change: $Author: gh $ $Date: 2001-05-04 10:51:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -538,6 +538,7 @@ void TextEditImp::Command( const CommandEvent& rCEvt )
{
switch( rCEvt.GetCommand() ) {
case COMMAND_CONTEXTMENU:
case COMMAND_WHEEL:
GetParent()->Command( rCEvt );
break;
default: