1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
Files
gnosygnu_xowa/150_gfui/src/gplx/gfui/controls/standards/GfuiTextMemo.java
2017-02-06 22:14:55 -05:00

43 lines
2.3 KiB
Java

/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfui.controls.standards; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*;
import gplx.gfui.controls.gxws.*;
public class GfuiTextMemo extends GfuiTextBox { public int LinesPerScreen() {return textBox.LinesPerScreen();}
public int LinesTotal() {return textBox.LinesTotal();}
public int ScreenCount() {return Int_.DivAndRoundUp(this.LinesTotal(), this.LinesPerScreen());}
public int CharIndexOfFirst() {return textBox.CharIndexOfFirst();}
public int CharIndexOf(int lineIndex) {return textBox.CharIndexOf(lineIndex);}
public int CharIndexAtLine(int lineIndex) {return textBox.CharIndexOf(lineIndex);}
public int LineIndexOfFirst() {return textBox.LineIndexOfFirst();}
public int LineIndexOf(int charIndex) {return textBox.LineIndexOf(charIndex);}
public PointAdp PosOf(int charIndex) {return textBox.PosOf(charIndex);}
public void ScrollLineUp() {textBox.ScrollLineUp();}
public void ScrollLineDown() {textBox.ScrollLineDown();}
public void ScrollScreenUp() {textBox.ScrollScreenUp();}
public void ScrollScreenDown() {textBox.ScrollScreenDown();}
public void SelectionStart_toFirstChar() {textBox.SelectionStart_toFirstChar(); Gfo_evt_mgr_.Pub(this, SelectionStartChanged_evt);}
public void ScrollTillSelectionStartIsFirstLine() {textBox.ScrollTillSelectionStartIsFirstLine();}
@Override public GxwElem UnderElem_make(Keyval_hash ctorArgs) {return GxwElemFactory_.Instance.text_memo_();}
@Override public void ctor_GfuiBox_base(Keyval_hash ctorArgs) {
super.ctor_GfuiBox_base(ctorArgs);
textBox = (GxwTextMemo)UnderElem();
this.SetTextBox(textBox);
} GxwTextMemo textBox;
}