Package aldrin :: Module main :: Class AldrinFrame
[show private | hide private]
[frames | no frames]

Type AldrinFrame

            object --+        
                     |        
             Interface --+    
                         |    
                IMainFrame --+
                             |
object --+                   |
         |                   |
    Object --+               |
             |               |
    EvtHandler --+           |
                 |           |
            Window --+       |
                     |       |
        TopLevelWindow --+   |
                         |   |
                     Frame --+
                             |
                            AldrinFrame


The application main window class.
Method Summary
  __init__(self, *args, **kwds)
Initializer.
  add_click_handler(self, toolid, func)
Adds a handler for when a tool is being clicked by the user.
int add_menuitem(self, label, description, kind)
Adds a new menuitem to the tools menu and returns the identifier.
int add_submenu(self, label, submenu, description)
Adds a new submenu to the tools menu and returns the identifier.
  add_tool_button(self, label, bitmap1, bitmap2, kind, tooltip, description)
Adds a new tool to the toolbar.
  clear(self)
Clears the current document.
  document_changed(self)
Event handler triggered when the document has changed.
  get_active_view(self)
Returns the active panel view.
wx.Window get_window(self)
Returns the window object associated with the mainframe.
  init_lunar(self)
Initializes the lunar dsp scripting system
  load_view(self)
Called to load view settings from config
  new(self, event)
Event handler triggered by the "New" menu option.
  on_about(self, event)
Event handler triggered by the "About" menu option.
  on_close(self, event)
Event handler triggered when the window is being closed.
  on_close_cpumonitor(self, event)
Called when the cpu monitor is closed manually.
  on_close_hdrecorder(self, event)
Called when the hd recorder is closed manually.
  on_copy(self, event)
Sent when the copy function is selected from the menu.
  on_cut(self, event)
Sent when the cut function is selected from the menu.
  on_destroy(self, event)
Event handler triggered when the window is being destroyed.
  on_exit(self, event)
Event handler triggered by the "Exit" menu option.
  on_framepanel_size(self, event)
Event handler that resizes the client panels, when the main window is being resized.
  on_handle_events(self, event)
Handler triggered by the default timer.
  on_help_contents(self, event)
Event handler triggered by the help menu option.
  on_key_down(self, event)
Event handler for key events.
  on_open(self, event)
Event handler triggered by the "Open File" menu option.
  on_paste(self, event)
Sent when the paste function is selected from the menu.
  on_preferences(self, event)
Event handler triggered by the "Preferences" menu option.
  on_save(self, event)
Event handler triggered by the "Save" menu option.
  on_save_as(self, event)
Event handler triggered by the "Save As" menu option.
  on_select_theme(self, event)
Event handler for theme radio menu items.
  on_toggle_automation(self, event)
handler triggered by the record toolbar button.
  on_toggle_automation_accel(self, event)
Handler triggered by the f7 accellerator.
  on_toggle_cpu_monitor(self, event)
Handler triggered by the "Toggle CPU Monitor" menu option.
  on_toggle_hard_disk_recorder(self, event)
Handler triggered by the "Toggle Hard Disk Recorder" menu option.
  on_toggle_loop(self, event)
Handler triggered by the loop toolbar button.
  on_toggle_mastertoolbar(self, event)
Handler triggered by the "Toggle Master Toolbar" menu option.
  on_toggle_panic(self, event)
Handler triggered by the mute toolbar button.
  on_toggle_panic_accel(self, event)
Handler triggered by the f12 accellerator.
  on_toggle_statusbar(self, event)
Handler triggered by the "Toggle Status Bar" menu option.
  on_toggle_timetoolbar(self, event)
Handler triggered by the "Toggle Time Toolbar" menu option.
  on_toggle_toolbar(self, event)
Handler triggered by the "Toggle Default" menu option.
  open(self)
Shows the open file dialog and if successful, loads the selected song from disk.
  open_file(self, filename)
Loads a song from disk.
  open_recent_file(self, event)
Event handler triggered by recent file menu options.
  play(self, event)
Event handler triggered by the "Play" toolbar button.
  play_from_cursor(self, event)
Event handler triggered by the F6 key.
  player_callback(self, player, plugin, data)
Default callback for ui events sent by zzub.
  save(self)
Shows a save file dialog if filename is unknown and saves the file.
  save_as(self)
Shows a save file dialog and saves the file.
  save_changes(self)
Asks whether to save changes or not.
  save_file(self, filename)
Saves a song to disk.
  save_view(self)
Called to store view settings to config
  select_page(self, index)
Selects a client panel.
  show_info(self, event)
Event handler triggered by the "Info" toolbar button.
  show_machines(self, event)
Event handler triggered by the "Machines" toolbar button.
  show_mastertoolbar(self, enable)
Shows or hides the mastertoolbar.
  show_patterns(self, event)
Event handler triggered by the "Patterns" toolbar button.
  show_sequencer(self, event)
Event handler triggered by the "Sequencer" toolbar button.
  show_statusbar(self, enable)
Shows or hides the status bar.
  show_timetoolbar(self, enable)
Shows or hides the timetoolbar.
  show_toolbar(self, enable)
Shows or hides the toolbar.
  show_wavetable(self, event)
Event handler triggered by the "Wavetable" toolbar button.
  stop(self, event)
Event handler triggered by the "Stop" toolbar button.
  update_filemenu(self, event)
Updates the most recent files in the file menu.
  update_title(self)
Updates the title to display the filename of the currently loaded document.
  update_view(self)
Called to update all viewstates.
    Inherited from Interface
  create_protected_proxy(self, ifaces)
Returns a protected proxy object that only exports methods defined in interfaces.
  get_interfaces(self)
Returns all supported interfaces.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
int ABOUT = 8838                                                                  
int CONTENTS = 5009                                                                  
int COPY = 5031                                                                  
int CUT = 5030                                                                  
str DEFAULT_EXTENSION = '.ccm'
dict event_to_name = {0: 'zzub_event_type_double_click', 1: '...
int EXIT = 5006                                                                  
str filename = ''
int i = 31                                                                    
int INFO = 8849                                                                  
int LOOP = 8847                                                                  
int MACHINES = 8840                                                                  
int MENUITEMBASE = 8980                                                                  
int NEW = 5002                                                                  
int nextmenuitemid = 8980                                                                  
int nexttoolid = 9012                                                                  
int OPEN = 5000                                                                  
int PAGE_INFO = 4                                                                     
int PAGE_PATTERN = 0                                                                     
int PAGE_ROUTE = 1                                                                     
int PAGE_SEQUENCER = 2                                                                     
int PAGE_WAVETABLE = 3                                                                     
int PANIC = 8850                                                                  
int PANIC_ACCEL = 8851                                                                  
int PASTE = 5032                                                                  
int PATTERNS = 8839                                                                  
int PLAY = 8842                                                                  
int PLAY_FROM_CURSOR = 8843                                                                  
int PREFERENCES = 8836                                                                  
int RECENTFILE = 5050                                                                  
int RECORD = 8844                                                                  
int RECORD_ACCEL = 8845                                                                  
int SAVE = 5003                                                                  
int SAVE_AS = 5004                                                                  
str SAVE_SONG_WILDCARD = 'CCM Songs (*.ccm)|*.ccm'
int SEQUENCER = 8841                                                                  
str SONG_WILDCARD = 'All songs (*.ccm,*.bmw,*.bmx)|*.ccm;*.b...
int STOP = 8846                                                                  
int THEMEBASE = 8852                                                                  
int THEMES = 8835                                                                  
str title = 'Aldrin'
int TOGGLE_CPU_MONITOR = 8828                                                                  
int TOGGLE_HARD_DISK_RECORDER = 8829                                                                  
int TOGGLE_MASTER = 8830                                                                  
int TOGGLE_SKINS = 8833                                                                  
int TOGGLE_STANDARD = 8834                                                                  
int TOGGLE_STATUS_BAR = 8831                                                                  
int TOGGLE_TIME = 8832                                                                  
int TOOLBASE = 9012                                                                  
int TOTD = 8837                                                                  
int WAVETABLE = 8848                                                                  
str x = 'zzub_wavetable_index_value_none'

Instance Method Details

__init__(self, *args, **kwds)
(Constructor)

Initializer.
Overrides:
wx._windows.Frame.__init__

add_click_handler(self, toolid, func)

Adds a handler for when a tool is being clicked by the user.
Parameters:
toolid - Id of the tool as returned by add_tool()
           (type=int)
func - Function to call. The function should take an additional event parameter.
           (type=callable)
Overrides:
aldrin.interface.IMainFrame.add_click_handler

add_menuitem(self, label, description='', kind=0)

Adds a new menuitem to the tools menu and returns the identifier.
Parameters:
label - Label of the item.
           (type=str)
description - Description for Status bar.
           (type=str)
kind - One of wx.ITEM_NORMAL, wx.ITEM_CHECK or wx.ITEM_RADIO
           (type=int)
Returns:
Identifier of the menuitem.
           (type=int)
Overrides:
aldrin.interface.IMainFrame.add_menuitem

add_submenu(self, label, submenu, description='')

Adds a new submenu to the tools menu and returns the identifier.
Parameters:
label - Label of the item.
           (type=str)
submenu - The submenu which to add.
           (type=wx.Menu)
description - Description for Status bar.
           (type=str)
Returns:
Identifier of the menuitem.
           (type=int)
Overrides:
aldrin.interface.IMainFrame.add_submenu

add_tool_button(self, label, bitmap1, bitmap2=wxPython wrapper for UNBORN object! (The C++ object is no..., kind=0, tooltip='', description='')

Adds a new tool to the toolbar.
Parameters:
label - Label of the button. Will not be visible on all systems.
           (type=str)
bitmap1 - Bitmap for the button.
           (type=wx.Bitmap)
bitmap2 - Bitmap for disabled button.
           (type=wx.Bitmap)
kind - One of wx.ITEM_NORMAL, wx.ITEM_CHECK or wx.ITEM_RADIO
           (type=int)
tooltip - Tooltip Text
           (type=str)
description - Description for Status bar.
           (type=str)
Overrides:
aldrin.interface.IMainFrame.add_tool_button

clear(self)

Clears the current document.

document_changed(self)

Event handler triggered when the document has changed. You should call this on occasions where the entire document has changed, else there are specialized handlers in the panel classes.

get_active_view(self)

Returns the active panel view.

get_window(self)

Returns the window object associated with the mainframe.
Returns:
Window object.
           (type=wx.Window)
Overrides:
aldrin.interface.IMainFrame.get_window

init_lunar(self)

Initializes the lunar dsp scripting system

load_view(self)

Called to load view settings from config

new(self, event)

Event handler triggered by the "New" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_about(self, event)

Event handler triggered by the "About" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_close(self, event)

Event handler triggered when the window is being closed.
Parameters:
event - event.
           (type=wx.Event)

on_close_cpumonitor(self, event)

Called when the cpu monitor is closed manually.
Parameters:
event - event.
           (type=wx.Event)

on_close_hdrecorder(self, event)

Called when the hd recorder is closed manually.
Parameters:
event - event.
           (type=wx.Event)

on_copy(self, event)

Sent when the copy function is selected from the menu.
Parameters:
event - Menu event.
           (type=wx.MenuEvent)

on_cut(self, event)

Sent when the cut function is selected from the menu.
Parameters:
event - Menu event.
           (type=wx.MenuEvent)

on_destroy(self, event)

Event handler triggered when the window is being destroyed.
Parameters:
event - event.
           (type=wx.Event)

on_exit(self, event)

Event handler triggered by the "Exit" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_framepanel_size(self, event)

Event handler that resizes the client panels, when the main window is being resized.
Parameters:
event - size event.
           (type=wx.SizeEvent)

on_handle_events(self, event)

Handler triggered by the default timer. Calls player.handle_events() to work off the players message queue.
Parameters:
event - timer event
           (type=wx.TimerEvent)

on_help_contents(self, event)

Event handler triggered by the help menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_key_down(self, event)

Event handler for key events.
Parameters:
event - key event.
           (type=wx.KeyEvent)

on_open(self, event)

Event handler triggered by the "Open File" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_paste(self, event)

Sent when the paste function is selected from the menu.
Parameters:
event - Menu event.
           (type=wx.MenuEvent)

on_preferences(self, event)

Event handler triggered by the "Preferences" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_save(self, event)

Event handler triggered by the "Save" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_save_as(self, event)

Event handler triggered by the "Save As" menu option.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_select_theme(self, event)

Event handler for theme radio menu items.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

on_toggle_automation(self, event)

handler triggered by the record toolbar button. Decides whether changes to parameters are recorded or not.
Parameters:
event - Command event.
           (type=wx.CommandEvent)

on_toggle_automation_accel(self, event)

Handler triggered by the f7 accellerator. Enables/disables automation.

@param event command event.
Parameters:
event
           (type=wx.CommandEvent)

on_toggle_cpu_monitor(self, event)

Handler triggered by the "Toggle CPU Monitor" menu option. Shows and hides the CPU Monitor panel.
Parameters:
event - Command event.
           (type=wx.CommandEvent)

on_toggle_hard_disk_recorder(self, event)

Handler triggered by the "Toggle Hard Disk Recorder" menu option. Shows and hides the Hard Disk Recorder panel.
Parameters:
event - command event.
           (type=wx.CommandEvent)

on_toggle_loop(self, event)

Handler triggered by the loop toolbar button. Decides whether the song loops or not.

@param event command event.
Parameters:
event
           (type=wx.CommandEvent)

on_toggle_mastertoolbar(self, event)

Handler triggered by the "Toggle Master Toolbar" menu option. Shows and hides the master toolbar.
Parameters:
event - command event.
           (type=wx.CommandEvent)

on_toggle_panic(self, event)

Handler triggered by the mute toolbar button. Deinits/reinits sound device.

@param event command event.
Parameters:
event
           (type=wx.CommandEvent)

on_toggle_panic_accel(self, event)

Handler triggered by the f12 accellerator. Deinits/reinits sound device.

@param event command event.
Parameters:
event
           (type=wx.CommandEvent)

on_toggle_statusbar(self, event)

Handler triggered by the "Toggle Status Bar" menu option. Shows and hides the status bar.
Parameters:
event - command event.
           (type=wx.CommandEvent)

on_toggle_timetoolbar(self, event)

Handler triggered by the "Toggle Time Toolbar" menu option. Shows and hides the time toolbar.
Parameters:
event - command event.
           (type=wx.CommandEvent)

on_toggle_toolbar(self, event)

Handler triggered by the "Toggle Default" menu option. Shows and hides the toolbar.
Parameters:
event - command event.
           (type=wx.CommandEvent)

open(self)

Shows the open file dialog and if successful, loads the selected song from disk.

open_file(self, filename)

Loads a song from disk. The old document will be wiped, and the song will be added to the recent file list.
Parameters:
filename - Path to song.
           (type=str)

open_recent_file(self, event)

Event handler triggered by recent file menu options.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

play(self, event)

Event handler triggered by the "Play" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

play_from_cursor(self, event)

Event handler triggered by the F6 key.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

player_callback(self, player, plugin, data)

Default callback for ui events sent by zzub.
Parameters:
player - player instance.
           (type=zzub.Player)
plugin - plugin instance
           (type=zzub.Plugin)
data - event data.
           (type=zzub_event_data_t)

save(self)

Shows a save file dialog if filename is unknown and saves the file.

save_as(self)

Shows a save file dialog and saves the file.

save_changes(self)

Asks whether to save changes or not. Throws a {CancelException} if cancelled.

save_file(self, filename)

Saves a song to disk. The document will also be added to the recent file list.
Parameters:
filename - Path to song.
           (type=str)

save_view(self)

Called to store view settings to config

select_page(self, index)

Selects a client panel. If the client panel has a view attribute, that view attribute is being interpreted as a window and will be focused, else the panel itself will be focused.
Parameters:
index - Index of the panel (use one of the self.PAGE_* constants)
           (type=int)

show_info(self, event)

Event handler triggered by the "Info" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

show_machines(self, event)

Event handler triggered by the "Machines" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

show_mastertoolbar(self, enable)

Shows or hides the mastertoolbar.
Parameters:
enable - If True, toolbar will be shown.
           (type=bool)

show_patterns(self, event)

Event handler triggered by the "Patterns" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

show_sequencer(self, event)

Event handler triggered by the "Sequencer" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

show_statusbar(self, enable)

Shows or hides the status bar.
Parameters:
enable - If True, status bar will be shown.
           (type=bool)

show_timetoolbar(self, enable)

Shows or hides the timetoolbar.
Parameters:
enable - If True, toolbar will be shown.
           (type=bool)

show_toolbar(self, enable)

Shows or hides the toolbar.
Parameters:
enable - If True, toolbar will be shown.
           (type=bool)

show_wavetable(self, event)

Event handler triggered by the "Wavetable" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

stop(self, event)

Event handler triggered by the "Stop" toolbar button.
Parameters:
event - menu event.
           (type=wx.MenuEvent)

update_filemenu(self, event=None)

Updates the most recent files in the file menu.
Parameters:
event - Event.
           (type=wx.Event)

update_title(self)

Updates the title to display the filename of the currently loaded document.

update_view(self)

Called to update all viewstates.

Class Variable Details

ABOUT

Type:
int
Value:
8838                                                                  

CONTENTS

Type:
int
Value:
5009                                                                  

COPY

Type:
int
Value:
5031                                                                  

CUT

Type:
int
Value:
5030                                                                  

DEFAULT_EXTENSION

Type:
str
Value:
'.ccm'                                                                 

event_to_name

Type:
dict
Value:
{0: 'zzub_event_type_double_click',
 1: 'zzub_event_type_new_plugin',
 2: 'zzub_event_type_delete_plugin',
 3: 'zzub_event_type_disconnect',
 4: 'zzub_event_type_connect',
 7: 'zzub_event_type_parameter_changed',
 8: 'zzub_event_type_load_progress',
 11: 'zzub_event_type_midi_control',
...                                                                    

EXIT

Type:
int
Value:
5006                                                                  

filename

Type:
str
Value:
''                                                                     

i

Type:
int
Value:
31                                                                    

INFO

Type:
int
Value:
8849                                                                  

LOOP

Type:
int
Value:
8847                                                                  

MACHINES

Type:
int
Value:
8840                                                                  

MENUITEMBASE

Type:
int
Value:
8980                                                                  

NEW

Type:
int
Value:
5002                                                                  

nextmenuitemid

Type:
int
Value:
8980                                                                  

nexttoolid

Type:
int
Value:
9012                                                                  

OPEN

Type:
int
Value:
5000                                                                  

PAGE_INFO

Type:
int
Value:
4                                                                     

PAGE_PATTERN

Type:
int
Value:
0                                                                     

PAGE_ROUTE

Type:
int
Value:
1                                                                     

PAGE_SEQUENCER

Type:
int
Value:
2                                                                     

PAGE_WAVETABLE

Type:
int
Value:
3                                                                     

PANIC

Type:
int
Value:
8850                                                                  

PANIC_ACCEL

Type:
int
Value:
8851                                                                  

PASTE

Type:
int
Value:
5032                                                                  

PATTERNS

Type:
int
Value:
8839                                                                  

PLAY

Type:
int
Value:
8842                                                                  

PLAY_FROM_CURSOR

Type:
int
Value:
8843                                                                  

PREFERENCES

Type:
int
Value:
8836                                                                  

RECENTFILE

Type:
int
Value:
5050                                                                  

RECORD

Type:
int
Value:
8844                                                                  

RECORD_ACCEL

Type:
int
Value:
8845                                                                  

SAVE

Type:
int
Value:
5003                                                                  

SAVE_AS

Type:
int
Value:
5004                                                                  

SAVE_SONG_WILDCARD

Type:
str
Value:
'CCM Songs (*.ccm)|*.ccm'                                              

SEQUENCER

Type:
int
Value:
8841                                                                  

SONG_WILDCARD

Type:
str
Value:
'All songs (*.ccm,*.bmw,*.bmx)|*.ccm;*.bmw;*.bmx|CCM Songs (*.ccm)|*.c\
cm|BMX Songs with waves (*.bmx)|*.bmx|BMX Songs without waves (*.bmw)|\
*.bmw'                                                                 

STOP

Type:
int
Value:
8846                                                                  

THEMEBASE

Type:
int
Value:
8852                                                                  

THEMES

Type:
int
Value:
8835                                                                  

title

Type:
str
Value:
'Aldrin'                                                               

TOGGLE_CPU_MONITOR

Type:
int
Value:
8828                                                                  

TOGGLE_HARD_DISK_RECORDER

Type:
int
Value:
8829                                                                  

TOGGLE_MASTER

Type:
int
Value:
8830                                                                  

TOGGLE_SKINS

Type:
int
Value:
8833                                                                  

TOGGLE_STANDARD

Type:
int
Value:
8834                                                                  

TOGGLE_STATUS_BAR

Type:
int
Value:
8831                                                                  

TOGGLE_TIME

Type:
int
Value:
8832                                                                  

TOOLBASE

Type:
int
Value:
9012                                                                  

TOTD

Type:
int
Value:
8837                                                                  

WAVETABLE

Type:
int
Value:
8848                                                                  

x

Type:
str
Value:
'zzub_wavetable_index_value_none'                                      

Generated by Epydoc 2.1 on Sun Feb 4 18:01:15 2007 http://epydoc.sf.net