Calculator and StdDev Tool 1.0
Python-based calculator with GUI and standard deviation functionality
Loading...
Searching...
No Matches
gui Namespace Reference

Functions

 _on_key (event)
 
 get_style (char)
 
 on_button_click (char)
 
 show_help ()
 

Variables

dict _keymap
 KEY BINDINGS.
 
 background
 
 bg
 
 borderwidth
 
list buttons
 END OF THEME SECTION.
 
 char
 
 column
 
 columnspan
 
 command
 
 display
 
 focuscolor
 
 focusthickness
 
 font
 
 foreground
 
 height
 
 highlightthickness
 
 i
 
 padx
 
 pady
 
 relief
 
bool resetMode = False
 
 root = tk.Tk()
 
 row
 
 rowspan
 
 sticky
 
 style = ttk.Style(root)
 
 style_name = get_style(char)
 
 text
 
 weight
 
 width
 

Function Documentation

◆ _on_key()

gui._on_key (   event)
protected

◆ get_style()

gui.get_style (   char)

◆ on_button_click()

gui.on_button_click (   char)

◆ show_help()

gui.show_help ( )

Variable Documentation

◆ _keymap

dict gui._keymap
protected
Initial value:
1= {
2 # “enter” → “=”
3 'Return': '=',
4 'KP_Enter': '=',
5 'equal': '=',
6 # clear / backspace
7 'Escape': 'C',
8 'BackSpace': '←',
9 # decimals
10 'period': '.',
11 'KP_Decimal':',',
12 'comma': ',',
13 # basic operators
14 'plus': '+', 'KP_Add': '+',
15 'minus': '-', 'KP_Subtract': '-',
16 'slash': '/', 'KP_Divide': '/',
17 'asterisk': '*', 'KP_Multiply': '*',
18 # exponent, factorial
19 'asciicircum':'^', 'exclam': '!',
20 # parentheses and help
21 'parenleft':'(', 'parenright': ')',
22 '?': '?', # if your keyboard layout makes '?' available
23 # digits (both main row and numpad)
24}

KEY BINDINGS.

◆ background

gui.background

◆ bg

gui.bg

◆ borderwidth

gui.borderwidth

◆ buttons

list gui.buttons
Initial value:
1= [
2 ['(', ')', '!', 'C', '←'],
3 ['7', '8', '9', '/', '√'],
4 ['4', '5', '6', '*', '^'],
5 ['1', '2', '3', '-', 'log'],
6 ['0', '.', ',', '+', '=']
7]

END OF THEME SECTION.

◆ char

gui.char

◆ column

gui.column

◆ columnspan

gui.columnspan

◆ command

gui.command

◆ display

gui.display
Initial value:
1= ttk.Label(
2 root,
3 style='Calc.TDisplay.TLabel',
4 anchor='e',
5 relief='solid',
6 borderwidth=5,
7 width=10
8)

◆ focuscolor

gui.focuscolor

◆ focusthickness

gui.focusthickness

◆ font

gui.font

◆ foreground

gui.foreground

◆ height

gui.height

◆ highlightthickness

gui.highlightthickness

◆ i

gui.i

◆ padx

gui.padx

◆ pady

gui.pady

◆ relief

gui.relief

◆ resetMode

bool gui.resetMode = False

◆ root

gui.root = tk.Tk()

◆ row

gui.row

◆ rowspan

gui.rowspan

◆ sticky

gui.sticky

◆ style

gui.style = ttk.Style(root)
          THEME

PLEASE DEFINE THE THEME ONLY IN THIS SECTION FOR CLARITY

◆ style_name

gui.style_name = get_style(char)

◆ text

gui.text

◆ weight

gui.weight

◆ width

gui.width