Class SymbolWidget
source code
CanvasWidget --+
|
TextWidget --+
|
SymbolWidget
A canvas widget that displays special symbols, such as the negation
sign and the exists operator. Symbols are specified by name. Currently,
the following symbol names are defined: neg
,
disj
, conj
, lambda
,
merge
, forall
, exists
,
subseteq
, subset
, notsubset
,
emptyset
, imp
, rightarrow
,
equal
, notequal
, epsilon
.
Attributes:
-
color
: the color of the text.
-
draggable
: whether the text can be dragged by the user.
|
|
string
|
symbol(self)
Returns:
the name of the symbol that is displayed by this symbol widget. |
source code
|
|
|
|
string
|
|
Inherited from TextWidget :
__getitem__ ,
__setitem__ ,
set_text ,
text
Inherited from CanvasWidget :
bbox ,
bind_click ,
bind_drag ,
canvas ,
child_widgets ,
destroy ,
height ,
hidden ,
hide ,
manage ,
move ,
parent ,
show ,
tags ,
unbind_click ,
unbind_drag ,
update ,
width
|
|
_SYMBOLS = { ' conj ' : ' \xd9 ' , ' disj ' : ' \xda ' , ' emptyset ' : ' \xc6 ' ...
A dictionary mapping from symbols to the character in the
symbol font used to render them.
|
__init__(self,
canvas,
symbol,
**attribs)
(Constructor)
| source code
|
Create a new symbol widget.
- Parameters:
canvas (Tkinter.Canvas ) - This canvas widget's canvas.
symbol (string ) - The name of the symbol to display.
attribs - The new canvas widget's attributes.
- Overrides:
CanvasWidget.__init__
|
- Returns:
string
- the name of the symbol that is displayed by this symbol widget.
|
Change the symbol that is displayed by this symbol widget.
- Parameters:
symbol (string ) - The name of the symbol to display.
|
- Returns:
string
- a string representation of this canvas widget.
- Overrides:
CanvasWidget.__repr__
- (inherited documentation)
|
_SYMBOLS
A dictionary mapping from symbols to the character in the
symbol font used to render them.
- Value:
{ ' conj ' : ' \xd9 ' ,
' disj ' : ' \xda ' ,
' emptyset ' : ' \xc6 ' ,
' epsilon ' : ' e ' ,
' equal ' : ' = ' ,
' exists ' : ' $ ' ,
' forall ' : ' " ' ,
' imp ' : ' \xde ' ,
...
|
|