Home | Trees | Index | Help |
|
---|
Package aldrin :: Module patterns :: Class PatternView |
|
CanvasBase
--+ |object
--+ | | |Object
--+ | | |EvtHandler
--+ | | |Window
--+ |Canvas
--+ | PatternView
Method Summary | |
---|---|
Initialization. | |
adjust_scrollbars(self)
| |
Adjusts the selection variables according to the selection mode. | |
(int, int, int, int, int) |
Converts a (x,y) character coordinate into a pattern position. |
Copies the current selection into the clipboard | |
Cuts the current selection into the clipboard | |
Overriding a Canvas method that paints onto an offscreen
buffer. | |
Returns the outermost coordinates in characters. | |
(zzub.Plugin, zzub.Pattern) |
Returns the plugin and the current pattern in the pattern view |
Finds an unused pattern name. | |
zzub.Plugin |
Returns the plugin of the pattern in the pattern view. |
Returns the size in characters of the virtual view area. | |
Initializes pattern storage and information. | |
Fills the current selection with values interpolated from selection start to selection end. | |
Moves the cursor down. | |
Moves the cursor one index position left. | |
Moves the cursor one index position right. | |
Moves the cursor left. | |
Moves the cursor right. | |
Moves the cursor one subindex position left. | |
Moves the cursor one subindex position right. | |
Moves the cursor one track position left. | |
Moves the cursor one track position right. | |
Moves the cursor up. | |
Callback that responds to key stroke in pattern view. | |
Callback that constructs and displays the popup menu | |
Sent when the copy function is selected from the menu. | |
Sent when the cut function is selected from the menu. | |
Callback that responds to key stroke in pattern view. | |
Callback that responds to left click in pattern view. | |
Callback that responds to mousewheeling in pattern view. | |
Sent when the paste function is selected from the menu. | |
Callback that adds a track. | |
Callback that creates a copy of the current pattern. | |
Callback that creates a pattern. | |
Callback that deletes last track. | |
Callback that shows the properties of the current pattern. | |
Callback that removes the current pattern. | |
Callback that solos current plugin. | |
Handles window scrolling. | |
Overriding a Canvas method that is called after painting
is completed. | |
Pastes the clipboard data into the pattern view. | |
Loads and redraws the pattern view after the pattern has been changed. | |
(int, int, int, int) |
Iterator that moves through the entire pattern. |
(int, int) |
Converts a pattern position into a (x,y) character coordinate. |
(int, int) |
Converts a pattern position into a (x,y) pixel coordinate. |
(int, int, int, int, int) |
Converts a (x,y) pixel coordinate into a pattern position. |
Initializes a buffer to handle the current pattern data. | |
Fills the current selection with random values. | |
refresh_view(self)
| |
(int, int, int, int) |
Iterator that moves through the current selection. |
Sets the current group position. | |
Sets the current index position. | |
Sets the octave. | |
Sets the current row position. | |
Sets the current subindex position. | |
Sets the current track position. | |
Puts the cursor into visible frame after a jump to the left. | |
Puts the cursor into visible frame after a jump to the right. | |
Transposes the current selection by an offset. | |
Unpacks clipboard data | |
Updates a line of the pattern. | |
Updates the position. | |
Inherited from Window | |
| |
AcceptsFocus(self) -> bool | |
AcceptsFocusFromKeyboard(self) -> bool | |
AddChild(self, Window child) | |
AssociateHandle(self, long handle) | |
CacheBestSize(self, Size size) | |
CaptureMouse(self) | |
Center(self, int direction=BOTH) | |
CenterOnParent(self, int dir=BOTH) | |
<function CenterOnScreen at 0xb6c14cdc> is deprecated | |
Center(self, int direction=BOTH) | |
CenterOnParent(self, int dir=BOTH) | |
<function CenterOnScreen at 0xb6c14cdc> is deprecated | |
ClearBackground(self) | |
ClientToScreen(self, Point pt) -> Point | |
ClientToScreenXY(int x, int y) -> (x,y) | |
Close(self, bool force=False) -> bool | |
ConvertDialogPointToPixels(self, Point pt) -> Point | |
ConvertDialogSizeToPixels(self, Size sz) -> Size | |
ConvertPixelPointToDialog(self, Point pt) -> Point | |
ConvertPixelSizeToDialog(self, Size sz) -> Size | |
Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool Create the GUI part of the Window for 2-phase creation mode. | |
Destroy(self) -> bool | |
DestroyChildren(self) -> bool | |
Disable(self) -> bool | |
DissociateHandle(self) | |
DLG_PNT(self, Point pt) -> Point | |
DLG_SZE(self, Size sz) -> Size | |
DragAcceptFiles(self, bool accept) | |
Enable(self, bool enable=True) -> bool | |
FindFocus() -> Window (Static method) | |
FindWindowById(self, long winid) -> Window | |
FindWindowByName(self, String name) -> Window | |
Fit(self) | |
FitInside(self) | |
Freeze(self) | |
GetAcceleratorTable(self) -> AcceleratorTable | |
GetAdjustedBestSize(self) -> Size | |
GetAutoLayout(self) -> bool | |
GetBackgroundColour(self) -> Colour | |
GetBackgroundStyle(self) -> int | |
GetBestFittingSize(self) -> Size | |
GetBestSize(self) -> Size | |
GetBestSizeTuple() -> (width, height) | |
GetBestVirtualSize(self) -> Size | |
GetBorder(self, long flags) -> int GetBorder(self) -> int | |
GetCapture() -> Window (Static method) | |
GetCaret(self) -> Caret | |
GetCharHeight(self) -> int | |
GetCharWidth(self) -> int | |
GetChildren(self) -> PyObject | |
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes (Static method) | |
GetClientAreaOrigin(self) -> Point | |
GetClientRect(self) -> Rect | |
GetClientSize(self) -> Size | |
GetClientSizeTuple() -> (width, height) | |
GetConstraints(self) -> LayoutConstraints | |
GetContainingSizer(self) -> Sizer | |
GetCursor(self) -> Cursor | |
GetDefaultAttributes(self) -> VisualAttributes | |
GetDefaultItem(self) -> Window | |
GetDropTarget(self) -> DropTarget | |
GetEventHandler(self) -> EvtHandler | |
GetExtraStyle(self) -> long | |
GetFont(self) -> Font | |
GetForegroundColour(self) -> Colour | |
GetFullTextExtent(String string, Font font=None) -> (width, height, descent, externalLeading) Get the width, height, decent and leading of the text using the current or specified font. | |
GetGrandParent(self) -> Window | |
GetHandle(self) -> long | |
GetHelpText(self) -> String | |
GetId(self) -> int | |
GetLabel(self) -> String | |
GetMaxHeight(self) -> int | |
GetMaxSize(self) -> Size | |
GetMaxWidth(self) -> int | |
GetMinHeight(self) -> int | |
GetMinSize(self) -> Size | |
GetMinWidth(self) -> int | |
GetName(self) -> String | |
GetParent(self) -> Window | |
GetPosition(self) -> Point | |
GetPositionTuple() -> (x,y) | |
GetRect(self) -> Rect | |
GetScrollPos(self, int orientation) -> int | |
GetScrollRange(self, int orientation) -> int | |
GetScrollThumb(self, int orientation) -> int | |
GetSize(self) -> Size | |
GetSizer(self) -> Sizer | |
GetSizeTuple() -> (width, height) | |
GetTextExtent(String string) -> (width, height) | |
GetThemeEnabled(self) -> bool | |
GetTitle(self) -> String | |
GetToolTip(self) -> ToolTip | |
GetUpdateClientRect(self) -> Rect | |
GetUpdateRegion(self) -> Region | |
GetValidator(self) -> Validator | |
GetVirtualSize(self) -> Size | |
GetVirtualSizeTuple() -> (width, height) | |
GetWindowStyleFlag(self) -> long | |
GetWindowStyleFlag(self) -> long | |
GetWindowVariant(self) -> int | |
HasCapture(self) -> bool | |
HasFlag(self, int flag) -> bool | |
HasScrollbar(self, int orient) -> bool | |
HasTransparentBackground(self) -> bool | |
Hide(self) -> bool | |
HitTest(self, Point pt) -> int | |
HitTestXY(self, int x, int y) -> int | |
InheritAttributes(self) | |
InheritsBackgroundColour(self) -> bool | |
InitDialog(self) | |
InvalidateBestSize(self) | |
IsBeingDeleted(self) -> bool | |
IsEnabled(self) -> bool | |
IsExposed(self, int x, int y, int w=1, int h=1) -> bool | |
IsExposedPoint(self, Point pt) -> bool | |
IsExposedRect(self, Rect rect) -> bool | |
IsRetained(self) -> bool | |
IsShown(self) -> bool | |
IsTopLevel(self) -> bool | |
Layout(self) -> bool | |
LineDown(self) -> bool | |
LineUp(self) -> bool | |
Lower(self) | |
MakeModal(self, bool modal=True) | |
Move(self, Point pt, int flags=SIZE_USE_EXISTING) | |
MoveAfterInTabOrder(self, Window win) | |
MoveBeforeInTabOrder(self, Window win) | |
MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) | |
Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool | |
NewControlId() -> int (Static method) | |
NextControlId(int winid) -> int (Static method) | |
PageDown(self) -> bool | |
PageUp(self) -> bool | |
PopEventHandler(self, bool deleteHandler=False) -> EvtHandler | |
PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool | |
PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool | |
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method. | |
PrepareDC(self, DC dc) | |
PrevControlId(int winid) -> int (Static method) | |
PushEventHandler(self, EvtHandler handler) | |
Raise(self) | |
Refresh(self, bool eraseBackground=True, Rect rect=None) | |
RefreshRect(self, Rect rect, bool eraseBackground=True) | |
RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool | |
ReleaseMouse(self) | |
RemoveChild(self, Window child) | |
RemoveEventHandler(self, EvtHandler handler) -> bool | |
Reparent(self, Window newParent) -> bool | |
ScreenToClient(self, Point pt) -> Point | |
ScreenToClientXY(int x, int y) -> (x,y) | |
ScrollLines(self, int lines) -> bool | |
ScrollPages(self, int pages) -> bool | |
ScrollWindow(self, int dx, int dy, Rect rect=None) | |
| |
SetAcceleratorTable(self, AcceleratorTable accel) | |
SetAutoLayout(self, bool autoLayout) | |
SetBackgroundColour(self, Colour colour) -> bool | |
SetBackgroundStyle(self, int style) -> bool Returns the background style of the window. | |
SetBestFittingSize(self, Size size=DefaultSize) | |
SetCaret(self, Caret caret) | |
SetClientRect(self, Rect rect) | |
SetClientSize(self, Size size) | |
SetClientSizeWH(self, int width, int height) | |
SetConstraints(self, LayoutConstraints constraints) | |
SetContainingSizer(self, Sizer sizer) | |
SetCursor(self, Cursor cursor) -> bool | |
SetDefaultItem(self, Window child) -> Window | |
SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels. | |
SetDropTarget(self, DropTarget dropTarget) | |
SetEventHandler(self, EvtHandler handler) | |
SetExtraStyle(self, long exStyle) | |
SetFocus(self) | |
SetFocusFromKbd(self) | |
SetFont(self, Font font) -> bool | |
SetForegroundColour(self, Colour colour) -> bool | |
SetHelpText(self, String text) | |
SetHelpTextForId(self, String text) | |
SetId(self, int winid) | |
SetLabel(self, String label) | |
SetMaxSize(self, Size maxSize) | |
SetMinSize(self, Size minSize) | |
SetName(self, String name) | |
SetOwnBackgroundColour(self, Colour colour) | |
SetOwnFont(self, Font font) | |
SetOwnForegroundColour(self, Colour colour) | |
Move(self, Point pt, int flags=SIZE_USE_EXISTING) | |
SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) | |
SetScrollbar(self, int orientation, int position, int thumbSize, int range, bool refresh=True) Sets the scrollbar properties of a built-in scrollbar. | |
SetScrollPos(self, int orientation, int pos, bool refresh=True) | |
SetSize(self, Size size) | |
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) Allows specification of minimum and maximum window sizes, and window size increments. | |
SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) | |
SetSizer(self, Sizer sizer, bool deleteOld=True) | |
SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) | |
SetSizeWH(self, int width, int height) | |
SetThemeEnabled(self, bool enableTheme) This function tells a window if it should use the system's "theme" code to draw the windows' background instead if its own background drawing code. | |
SetTitle(self, String title) | |
SetTmpDefaultItem(self, Window win) | |
SetToolTip(self, ToolTip tip) | |
SetToolTipString(self, String tip) | |
SetValidator(self, Validator validator) | |
SetVirtualSize(self, Size size) | |
SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) | |
SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) | |
SetVirtualSizeWH(self, int w, int h) | |
SetWindowStyleFlag(self, long style) | |
SetWindowStyleFlag(self, long style) | |
SetWindowVariant(self, int variant) | |
ShouldInheritColours(self) -> bool | |
Show(self, bool show=True) -> bool | |
Thaw(self) | |
TransferDataFromWindow(self) -> bool | |
TransferDataToWindow(self) -> bool | |
UnregisterHotKey(self, int hotkeyId) -> bool | |
Update(self) | |
UpdateWindowUI(self, long flags=UPDATE_UI_NONE) | |
UseBgCol(self) -> bool | |
Validate(self) -> bool | |
WarpPointer(self, int x, int y) | |
Inherited from EvtHandler | |
_setOORInfo(self, PyObject _self, bool incref=True) | |
AddPendingEvent(self, Event event) | |
Bind an event to an event handler. | |
Connect(self, int id, int lastId, int eventType, PyObject func) | |
Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool | |
GetEvtHandlerEnabled(self) -> bool | |
GetNextHandler(self) -> EvtHandler | |
GetPreviousHandler(self) -> EvtHandler | |
ProcessEvent(self, Event event) -> bool | |
ProcessPendingEvents(self) | |
SetEvtHandlerEnabled(self, bool enabled) | |
SetNextHandler(self, EvtHandler handler) | |
SetPreviousHandler(self, EvtHandler handler) | |
Disconencts the event handler binding for event from self. | |
Inherited from Object | |
GetClassName(self) -> String | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
Inherited from CanvasBase | |
| |
Performs the blit of the buffer contents on-screen. | |
Returns a tuple that contains the co-ordinates of the top-left and bottom-right corners of the canvas. | |
| |
| |
Renders the off-screen buffer on-screen. | |
Perform actual redraw to off-screen buffer only when the size of the canvas has changed. | |
Explicitly tells the canvas to redraw it's contents. |
Class Variable Summary | |
---|---|
str |
CLIPBOARD_MAGIC = 'PATTERNDATA'
|
classobj |
Selection = aldrin.patterns.Selection |
Inherited from CanvasBase | |
bool |
doublebuffered = True
|
Instance Method Details |
---|
__init__(self,
rootwindow,
*args,
**kwds)
Initialization.
|
adjust_selection(self)Adjusts the selection variables according to the selection mode. |
charpos_to_pattern(self, position)Converts a (x,y) character coordinate into a pattern position.
|
copy(self)Copies the current selection into the clipboard |
cut(self)Cuts the current selection into the clipboard |
DrawBuffer(self, row=None, rows=None, fulldraw=True)Overriding aCanvas method that paints onto an
offscreen buffer. Draws the pattern view graphics.
|
get_charbounds(self)Returns the outermost coordinates in characters. |
get_datasource(self)Returns the plugin and the current pattern in the pattern view
|
get_new_pattern_name(self)Finds an unused pattern name. |
get_plugin(self)Returns the plugin of the pattern in the pattern view.
|
get_virtual_size(self)Returns the size in characters of the virtual view area. |
init_values(self)Initializes pattern storage and information. |
interpolate_selection(self)Fills the current selection with values interpolated from selection start to selection end. |
move_down(self, step=1)Moves the cursor down.
|
move_index_left(self)Moves the cursor one index position left. |
move_index_right(self)Moves the cursor one index position right. |
move_left(self)Moves the cursor left. |
move_right(self)Moves the cursor right. |
move_subindex_left(self)Moves the cursor one subindex position left. |
move_subindex_right(self)Moves the cursor one subindex position right. |
move_track_left(self)Moves the cursor one track position left. |
move_track_right(self)Moves the cursor one track position right. |
move_up(self, step=1)Moves the cursor up.
|
on_char(self, event)Callback that responds to key stroke in pattern view.
|
on_context_menu(self, event)Callback that constructs and displays the popup menu
|
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_key_down(self, event)Callback that responds to key stroke in pattern view.
|
on_left_down(self, event)Callback that responds to left click in pattern view.
|
on_mousewheel(self, event)Callback that responds to mousewheeling in pattern view.
|
on_paste(self, event)Sent when the paste function is selected from the menu.
|
on_popup_add_track(self, event=None)Callback that adds a track. |
on_popup_create_copy(self, event=None)Callback that creates a copy of the current pattern. |
on_popup_create_pattern(self, event=None)Callback that creates a pattern. |
on_popup_delete_track(self, event=None)Callback that deletes last track. |
on_popup_properties(self, event=None)Callback that shows the properties of the current pattern. |
on_popup_remove_pattern(self, event=None)Callback that removes the current pattern. |
on_popup_solo(self, event=None)Callback that solos current plugin. |
on_scroll_window(self, event)Handles window scrolling. |
onPostPaint(self, dc)Overriding aCanvas method that is called after
painting is completed. Draws an XOR play cursor over the pattern
view.
|
paste(self)Pastes the clipboard data into the pattern view. The pasting mechanism looks a bit weird but its effective. you can serialize pattern data in a pasteable form, and upon deserialization the app tries to make parameters as valid as possible. Buzz used to not paste at all if the format wasnt right we still try to make some sense out of what we get. |
pattern_changed(self)Loads and redraws the pattern view after the pattern has been changed. |
pattern_range(self)Iterator that moves through the entire pattern.
|
pattern_to_charpos(self, row, group, track=0, index=0, subindex=0)Converts a pattern position into a (x,y) character coordinate.
|
pattern_to_pos(self, row, group, track=0, index=0, subindex=0)Converts a pattern position into a (x,y) pixel coordinate.
|
pos_to_pattern(self, position)Converts a (x,y) pixel coordinate into a pattern position.
|
prepare_textbuffer(self)Initializes a buffer to handle the current pattern data. |
randomize_selection(self)Fills the current selection with random values. |
selection_range(self)Iterator that moves through the current selection.
|
set_group(self, g)Sets the current group position.
|
set_index(self, i)Sets the current index position.
|
set_octave(self, o)Sets the octave.
|
set_row(self, r)Sets the current row position.
|
set_subindex(self, si)Sets the current subindex position.
|
set_track(self, t)Sets the current track position.
|
show_cursor_left(self)Puts the cursor into visible frame after a jump to the left. |
show_cursor_right(self)Puts the cursor into visible frame after a jump to the right. |
transpose_selection(self, offset)Transposes the current selection by an offset.
|
unpack_clipboard_data(self, d)Unpacks clipboard data
|
update_line(self, row)Updates a line of the pattern.
|
update_position(self, event)Updates the position. |
Class Variable Details |
---|
CLIPBOARD_MAGIC
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Feb 4 18:01:16 2007 | http://epydoc.sf.net |