Package qubx :: Module notebook :: Class NbController
[hide private]
[frames] | no frames]

Class NbController

source code

object --+
         |
        NbController

The global instance of this type, qubx.notebook.Notebook, is created by qubx.notebook.Init(), and keeps registries of the various output methods (NbTargets) and automatically-triggered NbItems.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
init_settings(self) source code
 
set_target_ix(self, x) source code
 
__finish_set_target_ix(self) source code
 
get_target_id(self) source code
 
set_target_id(self, x) source code
 
list_target_ids(self)
Returns all registered target_id values.
source code
 
__onSetProps(self, settings, updates) source code
 
__onSetPropsAuto(self, settings, updates) source code
 
register_target(self, target, target_id, caption, menu_caption=None, controls=None) source code
 
register_auto(self, auto_id, mnu_caption, default=False)
Declares that automatic items will be generated with this auto_id and caption.
source code
 
set_auto_active(self, auto_id, active) source code
 
send(self, item, target_ix=None, auto_id=None, target_id=None)
Writes an NbItem to the chosen NbTarget.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  target_ix
index of user's choice in targets
  target_id
chosen target's target_id
  target
chosen NbTarget
  OnAddAuto
WeakEvent(index, NbAutoRec)
  OnAddTarget
WeakEvent(index)
  OnChangeAuto
WeakEvent(index, NbAutoRec) e.g.
  OnChangeTargetIx
WeakEvent(index)
  OnRemovingTarget
WeakEvent(index)
  auto
dict(auto_id -> NbAutoRec)
  targets
list of NbTargetRec
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

register_auto(self, auto_id, mnu_caption, default=False)

source code 

Declares that automatic items will be generated with this auto_id and caption. With default=False, the user will have to enable it in the Notebook tab.

send(self, item, target_ix=None, auto_id=None, target_id=None)

source code 

Writes an NbItem to the chosen NbTarget.

Parameters:
  • target_ix - index of target in targets, or None to use the user's choice
  • target_id - if (target_ix is None), picks a target by its target_id
  • auto_id - for items generated automatically rather than by explicit user or script request; will check if auto item is active before emitting

Instance Variable Details [hide private]

target_ix

index of user's choice in targets
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

target_id

chosen target's target_id
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

target

chosen NbTarget
Get Method:
unreachable(self)

OnChangeAuto

WeakEvent(index, NbAutoRec) e.g. the user has toggled "active"