Main_Activity

The activity (GUI) for the calculator. Display and Buttons are managed here.

Author

"Martin Krischik" «krischik@users.sourceforge.net»

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
open class Pager_Adapter
Link copied to clipboard
private open class Toogle_On_Off

Properties

Link copied to clipboard
Calculator fragment
Link copied to clipboard
private open var CPU_Thread: Thread
Thread in which the virtual calculator CPU is running.
Link copied to clipboard
open var Menu: Menu_Fragment
Menu fragment
Link copied to clipboard
open var Menu_On_Off: MenuItem
the on off action bar enty
Link copied to clipboard
private open var On_Off_Switch: SwitchCompat
the view of the on of menue etnry.
Link copied to clipboard
open var Pager: ViewPager
Handles the pages in phone view
Link copied to clipboard
protected open var Preferences: IPreferences_
The application preferences
Link copied to clipboard
protected open var Printer: Printer_Fragment
Printer fragment (tablet only)
Link copied to clipboard
private open var Tablet_View: Boolean
Tablet view active — valid after After_Views
Link copied to clipboard
private val TAG: String
class logger tag.

Functions

Link copied to clipboard
protected open fun After_Views()
called after the views have been injected.
Link copied to clipboard
private open fun After_Views_Phone()
called after the views have been injected on phones.
Link copied to clipboard
private open fun After_Views_Tablet()
called after the views have been injected on tablets.
Link copied to clipboard
open fun bindCPUThread(CPU_Thread: Thread)
Set calculator Thread so the canvas can wake up the calculator after key / touch screen clicks.
Link copied to clipboard
Bind the fragment to its activity.
Link copied to clipboard
open fun bindService(Service: Calculator_Service)
Bind or unbind the calculator service
Link copied to clipboard
open fun buttonClearClick()
the clear printout button was clicked
Link copied to clipboard
open fun buttonFeedClick()
he form feed button was clicked
Link copied to clipboard
open fun buttonPrintClick()
the print display button was clicked
Link copied to clipboard
Calculator fragment (tablet only)
Link copied to clipboard
Text currently displayed
Link copied to clipboard
open fun getDisplayText(row: Int): Array<Short>
Link copied to clipboard
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc.
Link copied to clipboard
open fun getJavaText(): String
open fun getJavaText(row: Int): String
Link copied to clipboard
open fun getMemoryText(): String
Text currently displayed
Link copied to clipboard
open fun getName(): String
Returns the name of the resources (used for logging and idempotency of registration).
Link copied to clipboard
open fun getPressedKey(): Short
Get calculator key code of the currently pressed key.
Link copied to clipboard
open fun getPrintout(): String
Text currently displayed
Link copied to clipboard
open fun getReadKey(): Short
Get calculator key code of the last key (de)pressed.
Link copied to clipboard
Text currently displayed
Link copied to clipboard
get calculator from service
Link copied to clipboard
private open fun Is_New_Version(): Boolean
Vibrate an button click
Link copied to clipboard
open fun isIdleNow(): Boolean
Returns true if resource is currently idle.
Link copied to clipboard
Check if a calculator key code is available
Link copied to clipboard
copy text to clip board
Link copied to clipboard
copy text to clip board
Link copied to clipboard
open fun Menu_Documents()
show documents activity
Link copied to clipboard
open fun Menu_Feedback()
show feedback activity
Link copied to clipboard
open fun Menu_Help()
show help activity
Link copied to clipboard
open fun Menu_Reset()
copy text to clip board
Link copied to clipboard
open fun Menu_Settings()
show preferences
Link copied to clipboard
open fun onCreate(savedInstanceState: Bundle)
Called when the activity is first created.
Link copied to clipboard
open fun onCreateOptionsMenu(menu: Menu): Boolean
Initialize the contents of the Activity's standard options menu.
Link copied to clipboard
protected open fun onDestroy()
Link copied to clipboard
fun onResume()
Called after onRestoreInstanceState(Bundle), onRestart(), or onPause(), for your activity to start interacting with the user.
Link copied to clipboard
open fun onSaveInstanceState(Out_State: Bundle)
Link copied to clipboard
open fun onStart()
Open calculator and load file (if one was passed).
Link copied to clipboard
Printer fragment (tablet only)
Link copied to clipboard
open fun registerIdleTransitionCallback(callback: ResourceCallback)
Registers the given ResourceCallback with the resource.
Link copied to clipboard
Start service if it is not currently running.
Link copied to clipboard
open fun setDisplayText(Row: Int, Alpha_Text: Array<Short>)
Set text to be displayed (calculator alpha codes).
Link copied to clipboard
open fun setIndicators(Indicators: Array<Boolean>)
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc.
Link copied to clipboard
open fun setJavaText(javaText: String)
Set text to be displayed (java string).
Link copied to clipboard
open fun setOnOff(on: Boolean)
set the calculators on of status.
Link copied to clipboard
open fun setPressedKey(pressedKey: Short)
Get calculator key code of the currently pressed key.
Link copied to clipboard
open fun setPrintout(Text: String)
Set text to be displayed (java string).
Link copied to clipboard
open fun setReadKey(readKey: Short)
Get calculator key code of the last key (de)pressed.
Link copied to clipboard
open fun setReadKeys(readKeys: Array<Short>)
Get calculator key code of the last key (de)pressed.
Link copied to clipboard
open fun Show_Menu(view: View)
show the action bar (a click event handler, declared in the layout xml)
Link copied to clipboard
open fun stopCalculator()
Stop the calculator
Link copied to clipboard
switches the page (in phone layout).
Link copied to clipboard
open fun Tablet_View(): Boolean
check if wa are in tablet mode
Link copied to clipboard
open fun toString(): String
Generate string for debug purpose