Package qubx :: Module GTK
[hide private]
[frames] | no frames]

Module GTK

source code

General-purpose UI components.

Copyright 2007-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/>.

Classes [hide private]
  AskOnceDialog
Shows a message, some buttons, and a checkbox "[x] don't show this message again."
  InputDialog
Prompts the user to write or edit a string.
  NumEntryDialog
Prompts the user to write or edit a string.
  NumEntriesDialog
Prompts the user to write or edit some values.
  BusyDialog
Modal dialog with progress bar and stop button; supervises a long-running computation.
  NumEntry
Originally intended for numbers, this gtk.Entry can parse, validate and display any suitable data type.
  CheckListEntryItem
  CheckListEntry
Text widget showing state of a list of boolean items; clicking shows a popup with checkable items.
  CustomCheckListEntry
Text widget showing state of a list of boolean items; clicking shows a popup with checkable items; "Custom..." bypasses the checkboxes.
  V2Scale
Widget with two logarithmic sliders: coarse and fine.
  NumSliders
Widget containing V2Scale and NumEntry, for kbd and log-slider editing of a number.
  Pow10Slider
Horizontal logarithmish slider with steps at [s * top * 10**(p - powers) for s in steps, for p in range(powers)] + [top].
  DateBox
Widget for entering/editing legitimate datetime.datetime values.
  StaticComboList
A menu whose choices never change.
  DynamicComboBox
A menu which is re-built each time it drops down.
  SuggestiveComboBox
Like NumEntry, with drop-down list of suggestions.
  SimpleList
A gtk.TreeView specialized as a single-select single-column list.
  CheckList
A gtk.TreeView specialized as a two-column display: checkbox and label
  OrderedCheckList
A gtk.TreeView specialized as a two-column display: checkbox and label, plus columns with up and down arrows to modify order
  CountList
A gtk.TreeView specialized as a two-column display: count and label
  MultiList
A gtk.TreeView specialized as a multi-select, single-column list.
  DictTable
Specialization of a flat gtk.TreeView that can dynamically add columns for text or number.
  AspectGrid
  ZoomBar
Widget combining H scrollbar with zoom in/out buttons.
  Triangle
Shows a triangle; animates when you change angle.
  TriangleButton
gtk.Button decorated with a Triangle.
  TriangleExpander
  TextViewAppender
File-like object which appends to a gtk.TextView, optionally formatted, and scrolls to the end.
  CopyDialog
A customizable copy image dialog
  Requestable
Defines a resource which is calculated when needed and cached until invalidated; it may take a long time to calculate, so request is asynchronous -- you provide a receiver callback, which is called by gobject some time later.
  HyperTextView
  HyperTextView2
Functions [hide private]
 
tree_model_sort_order(*cols)
Returns a gtk.TreeModel sort_func which sorts first by column i, then column j, ...
source code
 
aspect_dimensions(w, h, n, aspect=1.618) source code
 
draw_inscribed_triangle(cr, w, h, color, angle, goal=None) source code
 
draw_inscribed_arrow(cr, w, h, draw_circle=True, point_theta=0.0, back_dtheta=1.41371669412, shaft_w_rads=0.4) source code
 
SetFixedWidth(textView, points=10)
Changes the font of a gtk.TextView to Monospace 10.
source code
 
SetClipboardCustom(clipboard, target, bytes)
Puts custom data on the specified clipboard, identified by target string.
source code
 
RGBAtoGDK(tup) source code
 
GDKtoRGBA(color) source code
 
ShowMessage(message, buttons=<enum GTK_BUTTONS_OK of type GtkButtonsType>, title='', parent=None) source code
 
PromptChoices(message, choices=['Cancel', 'OK'], title='', parent=None)
Returns index of choice; 0 is also window-close.
source code
 
PromptEntry(message, value, accept=None, format='%s', title='', parent=None)
Returns modified value, or None if canceled.
source code
 
PromptEntries(items, title='', parent=None)
Returns modified value list, or None if canceled.
source code
 
ChooseFolder(caption, path, parent=None) source code
 
Open(caption, path, do_open, filters=[('Text files', '.txt')], parent=None, allow_all_files=True, do_on_cancel=<__builtin__.function object>) source code
 
OpenMulti(caption, path, do_open, filters=[('Text files', '.txt')], parent=None, allow_all_files=True) source code
 
SaveAs(caption, path, name, do_save, filters=[('Text files', '.txt')], caption_if_exists='Overwrite', parent=None, allow_all_files=False) source code
 
pack_item(item, container, expand=False, fill=True, show=True, at_end=False) source code
 
pack_space(container, x=-1, y=-1, expand=False, fill=True, show=True, at_end=False) source code
 
pack_hsep(pix, container, x=-1, expand=False, fill=True, show=True, at_end=False) source code
 
pack_vsep(pix, container, y=-1, expand=False, fill=True, show=True, at_end=False) source code
 
pack_label(text, container, expand=False, fill=True, show=True, at_end=False) source code
 
pack_button(text, container, on_click=<__builtin__.function object>, sensitive=True, expand=False, fill=True, show=True, at_end=False) source code
 
pack_check(text, container, active=False, on_toggle=None, expand=False, fill=True, show=True, at_end=False) source code
 
pack_radio(text, container, group=None, active=False, on_toggle=None, expand=False, fill=True, show=True, at_end=False) source code
 
pack_scrolled(item, container, with_vp=False, x_policy=<enum GTK_POLICY_AUTOMATIC of type GtkPolicyType>, y_policy=<enum GTK_POLICY_AUTOMATIC of type GtkPolicyType>, size_request=(-1, -1), expand=False, fill=True, show=True, at_end=False) source code
 
build_menuitem(caption, on_activate=None, submenu=None, sensitive=None, show=True, menu=None, item_class=<type 'gtk.MenuItem'>, active=False) source code
 
is_front_app() source code
 
set_font_size(fs) source code
 
gtk_literally(s) source code
 
get_active_window() source code
 
read_tagged(buf, iter, tag) source code
Variables [hide private]
  MAX_EVENTS_PER_WAIT = 20
  HARMLESS_KEYS = [65361, 65363, 65362, 65364, 65360, 65367, 65379]
  __package__ = 'qubx'
  e = 2.71828182846
  pi = 3.14159265359
  rdbk = 'Expired.'
  rdbreak = 'supporting'
  rdname = 'qubfast.txt'
Function Details [hide private]

PromptEntries(items, title='', parent=None)

source code 

Returns modified value list, or None if canceled.

Parameters:
  • items - list of tuple (caption, value, accept, format)