diff options
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 25 | 
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index a4ac0be17..c00f08311 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -69,6 +69,7 @@ Editor::Editor() {  	xOffset = 0;  	xCaretMargin = 50; +	horizontalScrollBarVisible = true;  	currentPos = 0;  	anchor = 0; @@ -1275,6 +1276,10 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) {  	return endPosPrint;  } +// Empty method is overridden on GTK+ to show / hide scrollbars +void Editor::ReconfigureScrollBars() { +} +  void Editor::SetScrollBarsTo(PRectangle) {  	RefreshStyleData(); @@ -1818,6 +1823,9 @@ int Editor::KeyCommand(UINT iMessage) {  		MovePositionTo(PositionFromLocation(  		                   Point(lastXChosen, pt.y + vs.lineHeight)), true);  		break; +	case SCI_LINESCROLLDOWN: +		ScrollTo(topLine + 1); +		break;  	case SCI_LINEUP:  		MovePositionTo(PositionFromLocation(  		                   Point(lastXChosen, pt.y - vs.lineHeight))); @@ -1826,6 +1834,9 @@ int Editor::KeyCommand(UINT iMessage) {  		MovePositionTo(PositionFromLocation(  		                   Point(lastXChosen, pt.y - vs.lineHeight)), true);  		break; +	case SCI_LINESCROLLUP: +		ScrollTo(topLine - 1); +		break;  	case SCI_CHARLEFT:  		if (SelectionEmpty()) {  			MovePositionTo(MovePositionSoVisible(currentPos - 1, -1)); @@ -3394,6 +3405,15 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {  	case SCI_GETLINEINDENTPOSITION:  		return pdoc->GetLineIndentPosition(wParam); +	case SCI_SETHSCROLLBAR : +		horizontalScrollBarVisible = wParam; +		SetScrollBars(); +		ReconfigureScrollBars(); +		break; +		 +	case SCI_GETHSCROLLBAR: +		return horizontalScrollBarVisible; +		  	case SCI_SETCODEPAGE:  		pdoc->dbcsCodePage = wParam;  		break; @@ -3793,6 +3813,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {  	case SCI_LINETRANSPOSE:  	case SCI_LOWERCASE:  	case SCI_UPPERCASE: +	case SCI_LINESCROLLDOWN: +	case SCI_LINESCROLLUP:  		return KeyCommand(iMessage);  	case SCI_BRACEHIGHLIGHT: @@ -3856,6 +3878,9 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {  		SetSelection(currentPos, anchor);	// Ensure selection inside document  		return 0; +	case SCI_SELECTIONISRECTANGLE: +		return (selType == selRectangle) ? 1 : 0; +  #ifdef MACRO_SUPPORT  	case SCI_STARTRECORD:  		recordingMacro = 1;  | 
