Trees | Indices | Help |
|
---|
|
Widget with switchable mouse controllers (Tools) and transparent overlays and layers.
Colors are given as a pair: COLORREF=(name_for_prefs, (r,g,b,a)). (r,g,b,a) is the initial default. Each time it draws, a ToolSpace looks up its colors (and font) in self.appearance (type TS_Appearance):
>>> r,g,b,a = self.appearance.color(COLORREF)
You can change the color:
>>> self.appearance.colors[COLORREF].set( (r,g,b,a) )
Or swap in a different TS_Appearance, e.g. for black and white printing:
>>> set_aside, self.appearance = self.appearance, black_and_white_appearance
Appearance prefs are saved by qubx.util_panels.SettingsFace.
Layers and sublayers are laid out statically, in multiples of appearance.emsize. Negative coordinates or dimensions indicate distance from the right or bottom edge. When font size or widget dimensions change, it updates the layout.
Copyright 2008-2014 Research Foundation State University of New York This file is part of QUB Express.
QUB Express is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QUB Express 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 General Public License for more details.
You should have received a copy of the GNU General Public License, named LICENSE.txt, in the QUB Express program directory. If not, see <http://www.gnu.org/licenses/>.
|
|||
TS_Color Represents one named color. |
|||
TS_Appearance Holds color and font preferences. |
|||
TS_ColorsDialog Modeless window for changing the (r,g,b,a) values in appearance.colors. |
|||
ToolSpace Base widget with these features: |
|||
ToolSpace_GL | |||
GLSpace Base widget with these features: |
|||
LayerSet | |||
Tool Receives mouse events from a ToolSpace. |
|||
Layer A floating, transparent, clickable area in a ToolSpace. |
|||
SubLayer A specific display element or control on a Layer in a ToolSpace. |
|||
RotRect Represents a rectangle that has been rotated theta radians about (x0, y0). |
|||
OverlayRgnTool Base class for a Tool which defines RotRect regions of interest. |
|||
OverlayRgnCaptionedTool Base class for a Tool which presents a message and highlights regions of interest. |
|||
Spotlight Demo tool to shine a spotlight on a ToolSpace. |
|||
Layer_Toolbar Layer containing a row or column of buttons; automatically laid out; spotlighted on rollover with tooltips. |
|||
Overlay_Tooltip Draws a tool-tip on a ToolSpace. |
|||
SubLayer_Label Displays a string of text. |
|||
SubLayer_UpDown The little up and down buttons, such as next to a number. |
|||
SubLayer_Check A box that is active or not; click to toggle. |
|||
SubLayer_Popup A circle with inscribed triangle, which shows a menu when clicked. |
|||
Button_Popup | |||
Button_Popup_PNG | |||
SubLayer_MenuLines A collection of horizontal lines, which shows a menu when clicked. |
|||
Button_MenuLines | |||
SubLayer_DropDown A combo-box in the style of csDropDownList (enumerated choices only). |
|||
Tool_DropDown Displays a drop-down menu (from SubLayer_DropDown) and handles mouse clicks. |
|||
SubLayer_Range A slightly nonstandard scroll bar; grab the left or right edge to resize the thumb. |
|||
SubLayer_Mag Draws a magnifying glass under the label. |
|||
SubLayer_PNG | |||
SubLayer_Popup_PNG | |||
SubLayer_Icon A little icon suitable for Layer_Toolbar. |
|||
SubLayer_Ruler A little yellow ruler icon. |
|||
SubLayer_Eraser An eraser icon. |
|||
SubLayer_Stamp A rubber stamp icon. |
|||
SubLayer_Arrow An arrow. |
|||
SubLayer_Progress Progress bar, from 0 to 100. |
|||
SubLayer_Radio Label with radio button behavior. |
|||
Palette | |||
SubLayer_SmoothZoom | |||
SubLayer_PanIcon |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
gtkHas2Click = False
|
|||
DBL_CLICK_MS = 250
|
|||
ColorInfo = defaultdict(<function <lambda> at 0x7fd123474500>,
|
|||
LAYER_BG =
|
|||
LAYER_FG =
|
|||
LAYER_BORDER =
|
|||
COLOR_CLEAR =
|
|||
COLOR_BLACK =
|
|||
COLOR_WHITE =
|
|||
COLOR_LABEL =
|
|||
COLOR_HOVER =
|
|||
COLOR_POPUP =
|
|||
COLOR_DROPDOWN =
|
|||
COLOR_RANGE =
|
|||
COLOR_RANGE_HOVER =
|
|||
COLOR_RANGE_EXPAND =
|
|||
COLOR_TOOLTIP_BG =
|
|||
COLOR_TOOLTIP_FG =
|
|||
COLOR_CHECK =
|
|||
COLOR_PALETTE_TEXT =
|
|||
COLOR_PALETTE_MORE =
|
|||
COLOR_RADIO_FILL =
|
|||
COLOR_FOCUSED =
|
|||
COLOR_MAG_RIM =
|
|||
COLOR_MAG_LENS =
|
|||
PALETTE_H_EMS = 2.3
|
|||
TOOLBAR_PAD = 0.5
|
|||
Appearance = <qubx.toolspace.TS_Appearance object>
|
|||
glprefs_path = os.path.join(__main__.QUBX_HOME_PATH, 'Presets'
|
|||
wanted = True
|
|||
HAVE_OPENGL = False
|
|||
COLOR = defaultdict(<function <lambda> at 0x7fd12349c2a8>, {0:
|
|||
offset = 7
|
|||
ZOOM_FACTOR = 1.02
|
|||
ZOOM_FACTOR_PER_PIXEL = 0.001
|
|||
ZOOM_DELAY_MS = 20
|
|||
COLOR_ZOOM =
|
|||
COLOR_ZOOM_HOVER =
|
|||
__package__ =
|
|||
c =
|
|||
e = 2.71828182846
|
|||
i = 19
|
|||
pi = 3.14159265359
|
|||
rdbk =
|
|||
rdbreak =
|
|||
rdname =
|
|
ColorInfo
|
COLOR_RANGE_EXPAND
|
COLOR_PALETTE_MORE
|
glprefs_path
|
COLOR
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Dec 15 19:07:38 2017 | http://epydoc.sourceforge.net |