Module mainGUI :: Class MainGUIWindow
[hide private]
[frames] | no frames]

Class MainGUIWindow

source code


Instance Methods [hide private]
EvtHandler
__init__(self, *args, **kwds)
__init__(self, Window parent, int id=-1, String title=EmptyString, ...
source code
 
__set_properties(self) source code
 
__do_layout(self) source code
 
initData(self, env, shipType, worldModel, strategy, numSteps, speed)
Init application specific data
source code
 
setSimEnv(self, env)
The GUI queries the env for its state and display it
source code
 
setConfigurationOptions(self, shipType, worldModel, strategy)
Passing the cmd-line configuration options.
source code
 
setNumStepsToSimulate(self, numSteps) source code
 
OnRunClick(self, event)
Callback for the run button, starts the simulation
source code
 
OnZoominClick(self, event)
Zoom in callback.
source code
 
OnZoomoutClick(self, event)
Zoom out callback.
source code
 
StartTimers(self, event)
Initialize timers for different events
source code
 
Update(self, event)
Call back for the timer event
source code
 
UpdateScreen(self)
Draws the next frame in the animation.
source code
 
UpdateBackground(self, event)
Colors the background in self.bgColor.
source code
 
OnQuit(self, event) source code
 
drawRRTHook(self)
This callback is being used only if there is an RRT to be drawn.
source code
 
drawRRT(self, RRTStrategy, color) source code
 
drawStartEndHook(self)
This hook is used when we want to draw the start and goal states.
source code
 
drawPathHook(self)
This hook is used when we want to draw the waypoints of each agent's path, for all agents.
source code
 
drawObstacleHook(self)
This hook is used for drawing a specific obstacle.
source code
 
onlineHeuristicDivideHook(self)
Draws a red/green background to every ship depending on whether they are ready
source code
 
trackingHook(self)
Call back for drawing when a ship is tracking another
source code
 
basicPatrolHook(self)
Just calls other hooks.
source code
 
noopHook(self) source code
 
screen(self, coord) source code

Inherited from wx._windows.Frame: Command, Create, CreateStatusBar, CreateToolBar, DoGiveHelp, DoMenuUpdates, GetMenuBar, GetStatusBar, GetStatusBarPane, GetToolBar, PopStatusText, ProcessCommand, PushStatusText, SendSizeEvent, SetMenuBar, SetStatusBar, SetStatusBarPane, SetStatusText, SetStatusWidths, SetToolBar

Inherited from wx._windows.TopLevelWindow: CenterOnScreen, CentreOnScreen, EnableCloseButton, GetDefaultItem, GetIcon, GetTitle, GetTmpDefaultItem, Iconize, IsActive, IsAlwaysMaximized, IsFullScreen, IsIconized, IsMaximized, MacGetMetalAppearance, MacGetTopLevelWindowRef, MacGetUnifiedAppearance, MacSetMetalAppearance, Maximize, RequestUserAttention, Restore, SetDefaultItem, SetIcon, SetIcons, SetShape, SetTitle, SetTmpDefaultItem, ShowFullScreen, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetToolTipString, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

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

Static Methods [hide private]

Inherited from wx._windows.Frame: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Instance Variables [hide private]
  ship
self.shipPositions = [self.ship.get_rect().move(600, random.randint(0,400)) for i in range(10)]
  shipRotatedPositions
self.angle = -90
Properties [hide private]

Inherited from wx._windows.Frame: MenuBar, StatusBar, StatusBarPane, ToolBar, thisown

Inherited from wx._windows.TopLevelWindow: DefaultItem, Icon, Title, TmpDefaultItem

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, ToolTipString, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

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

source code 

__init__(self, Window parent, int id=-1, String title=EmptyString, 
    Point pos=DefaultPosition, Size size=DefaultSize, 
    long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> Frame

Returns: EvtHandler
Overrides: object.__init__
(inherited documentation)

setConfigurationOptions(self, shipType, worldModel, strategy)

source code 

Passing the cmd-line configuration options. Based on what the user chose on the cmd-line, we might have different GUI configurations.

Update(self, event)

source code 

Call back for the timer event

Overrides: wx._core.Window.Update

UpdateScreen(self)

source code 

Draws the next frame in the animation.

Uses the "dirty rectangles" method. This method only updates changed parts of the screen, in contrast to updating all the screen each frame. It gives significant performance improvement.

UpdateBackground(self, event)

source code 

Colors the background in self.bgColor. This make sure background is always there, even after switching tabs, moving windows above it, and so on

drawRRTHook(self)

source code 

This callback is being used only if there is an RRT to be drawn. It is determined in setConfigurationOptions()