// Path: PalmCalc/src/com/cybrosys/basic/CalculatorDisplay.java
// enum Scroll {
// 	UP, DOWN, NONE
// }


import com.cybrosys.basic.CalculatorDisplay.Scroll;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.widget.EditText;
import android.content.Context;
import java.util.Locale;
import org.javia.arity.Symbols;
import org.javia.arity.SyntaxException;
		EditText editText = mDisplay.getEditText();
		int cursorPos = editText.getSelectionStart();
		return toLeft ? cursorPos == 0 : cursorPos >= editText.length();
	}

	private String getText() {
		return mDisplay.getText().toString();
	}

	void insert(String delta) {
		Log.d("Display", delta);
		mDisplay.insert(delta);
		setDeleteMode(DELETE_MODE_BACKSPACE);
	}

	public void resumeWithHistory() {
		clearWithHistory(false);
	}

	private void clearWithHistory(boolean scroll) {
		String text = mHistory.getText();
		if (MARKER_EVALUATE_ON_RESUME.equals(text)) {
			if (!mHistory.moveToPrevious()) {
				text = "";
			}
			text = mHistory.getText();
			evaluateAndShowResult(text, CalculatorDisplay.Scroll.NONE);
		} else {
			mResult = "";
			mDisplay.setText(text, scroll ? CalculatorDisplay.Scroll.UP
// Path: PalmCalc/src/com/cybrosys/basic/CalculatorDisplay.java
// enum Scroll {
// 	UP, DOWN, NONE
// }


// Path: PalmCalc/src/com/cybrosys/basic/Logic.java
import com.cybrosys.basic.CalculatorDisplay.Scroll;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.widget.EditText;
import android.content.Context;
import java.util.Locale;
import org.javia.arity.Symbols;
import org.javia.arity.SyntaxException;

		EditText editText = mDisplay.getEditText();
		int cursorPos = editText.getSelectionStart();
		return toLeft ? cursorPos == 0 : cursorPos >= editText.length();
	}

	private String getText() {
		return mDisplay.getText().toString();
	}

	void insert(String delta) {
		Log.d("Display", delta);
		mDisplay.insert(delta);
		setDeleteMode(DELETE_MODE_BACKSPACE);
	}

	public void resumeWithHistory() {
		clearWithHistory(false);
	}

	private void clearWithHistory(boolean scroll) {
		String text = mHistory.getText();
		if (MARKER_EVALUATE_ON_RESUME.equals(text)) {
			if (!mHistory.moveToPrevious()) {
				text = "";
			}
			text = mHistory.getText();
			evaluateAndShowResult(text, CalculatorDisplay.Scroll.NONE);
		} else {
			mResult = "";
			mDisplay.setText(text, scroll ? CalculatorDisplay.Scroll.UP
					: CalculatorDisplay.Scroll.NONE);