actions.py (1476B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\inflight\actions.py 2 import carbonui.const as uiconst 3 from carbonui.window.widget import WidgetWindow 4 from carbonui.primitives.container import Container 5 from eve.common.lib import appConst as const 6 7 class ActionPanel(WidgetWindow): 8 __guid__ = 'form.ActionPanel' 9 default_width = 360 10 default_height = 160 11 12 def ApplyAttributes(self, attributes): 13 super(ActionPanel, self).ApplyAttributes(attributes) 14 showActions = attributes.get('showActions', True) 15 self.panelname = attributes.panelName 16 self.lastActionSerial = None 17 self.sr.actions = None 18 self.sr.actionsTimer = None 19 self.scope = uiconst.SCOPE_INFLIGHT 20 if self.panelname: 21 self.SetCaption(self.panelname) 22 self.MakeUnKillable() 23 main = self.sr.main 24 main.clipChildren = True 25 if showActions: 26 self.sr.actions = Container(name='actions', align=uiconst.TOBOTTOM, parent=self.sr.main, height=32) 27 self.PostStartup() 28 self.UpdateAll() 29 30 def _OnClose(self, *args): 31 self.sr.actionsTimer = None 32 self.Closing() 33 34 def PostStartup(self): 35 pass 36 37 def Closing(self): 38 pass 39 40 def GetActions(self): 41 return [] 42 43 def UpdateAll(self): 44 if self.sr.main.state != uiconst.UI_PICKCHILDREN: 45 self.sr.actionsTimer = None 46 return