📄 _misc.py
字号:
WINDOWS_OS2 = _misc_.WINDOWS_OS2
UNIX = _misc_.UNIX
X11 = _misc_.X11
PALMOS = _misc_.PALMOS
DOS = _misc_.DOS
def GetOsVersion(*args):
"""GetOsVersion() -> (platform, major, minor)"""
return _misc_.GetOsVersion(*args)
def GetOsDescription(*args):
"""GetOsDescription() -> String"""
return _misc_.GetOsDescription(*args)
def GetFreeMemory(*args):
"""GetFreeMemory() -> wxMemorySize"""
return _misc_.GetFreeMemory(*args)
SHUTDOWN_POWEROFF = _misc_.SHUTDOWN_POWEROFF
SHUTDOWN_REBOOT = _misc_.SHUTDOWN_REBOOT
def Shutdown(*args, **kwargs):
"""Shutdown(int wFlags) -> bool"""
return _misc_.Shutdown(*args, **kwargs)
def Sleep(*args, **kwargs):
"""Sleep(int secs)"""
return _misc_.Sleep(*args, **kwargs)
def MilliSleep(*args, **kwargs):
"""MilliSleep(unsigned long milliseconds)"""
return _misc_.MilliSleep(*args, **kwargs)
def MicroSleep(*args, **kwargs):
"""MicroSleep(unsigned long microseconds)"""
return _misc_.MicroSleep(*args, **kwargs)
Usleep = MilliSleep
def EnableTopLevelWindows(*args, **kwargs):
"""EnableTopLevelWindows(bool enable)"""
return _misc_.EnableTopLevelWindows(*args, **kwargs)
def StripMenuCodes(*args, **kwargs):
"""StripMenuCodes(String in) -> String"""
return _misc_.StripMenuCodes(*args, **kwargs)
def GetEmailAddress(*args):
"""GetEmailAddress() -> String"""
return _misc_.GetEmailAddress(*args)
def GetHostName(*args):
"""GetHostName() -> String"""
return _misc_.GetHostName(*args)
def GetFullHostName(*args):
"""GetFullHostName() -> String"""
return _misc_.GetFullHostName(*args)
def GetUserId(*args):
"""GetUserId() -> String"""
return _misc_.GetUserId(*args)
def GetUserName(*args):
"""GetUserName() -> String"""
return _misc_.GetUserName(*args)
def GetHomeDir(*args):
"""GetHomeDir() -> String"""
return _misc_.GetHomeDir(*args)
def GetUserHome(*args, **kwargs):
"""GetUserHome(String user=EmptyString) -> String"""
return _misc_.GetUserHome(*args, **kwargs)
def GetProcessId(*args):
"""GetProcessId() -> unsigned long"""
return _misc_.GetProcessId(*args)
def Trap(*args):
"""Trap()"""
return _misc_.Trap(*args)
def FileSelector(*args, **kwargs):
"""
FileSelector(String message=FileSelectorPromptStr, String default_path=EmptyString,
String default_filename=EmptyString,
String default_extension=EmptyString,
String wildcard=FileSelectorDefaultWildcardStr,
int flags=0, Window parent=None, int x=-1,
int y=-1) -> String
"""
return _misc_.FileSelector(*args, **kwargs)
def LoadFileSelector(*args, **kwargs):
"""
LoadFileSelector(String what, String extension, String default_name=EmptyString,
Window parent=None) -> String
"""
return _misc_.LoadFileSelector(*args, **kwargs)
def SaveFileSelector(*args, **kwargs):
"""
SaveFileSelector(String what, String extension, String default_name=EmptyString,
Window parent=None) -> String
"""
return _misc_.SaveFileSelector(*args, **kwargs)
def DirSelector(*args, **kwargs):
"""
DirSelector(String message=DirSelectorPromptStr, String defaultPath=EmptyString,
long style=wxDD_DEFAULT_STYLE,
Point pos=DefaultPosition, Window parent=None) -> String
"""
return _misc_.DirSelector(*args, **kwargs)
def GetTextFromUser(*args, **kwargs):
"""
GetTextFromUser(String message, String caption=EmptyString, String default_value=EmptyString,
Window parent=None,
int x=-1, int y=-1, bool centre=True) -> String
"""
return _misc_.GetTextFromUser(*args, **kwargs)
def GetPasswordFromUser(*args, **kwargs):
"""
GetPasswordFromUser(String message, String caption=EmptyString, String default_value=EmptyString,
Window parent=None) -> String
"""
return _misc_.GetPasswordFromUser(*args, **kwargs)
def GetSingleChoice(*args, **kwargs):
"""
GetSingleChoice(String message, String caption, int choices, Window parent=None,
int x=-1, int y=-1, bool centre=True,
int width=150, int height=200) -> String
"""
return _misc_.GetSingleChoice(*args, **kwargs)
def GetSingleChoiceIndex(*args, **kwargs):
"""
GetSingleChoiceIndex(String message, String caption, int choices, Window parent=None,
int x=-1, int y=-1, bool centre=True,
int width=150, int height=200) -> int
"""
return _misc_.GetSingleChoiceIndex(*args, **kwargs)
def MessageBox(*args, **kwargs):
"""
MessageBox(String message, String caption=EmptyString, int style=wxOK|wxCENTRE,
Window parent=None, int x=-1,
int y=-1) -> int
"""
return _misc_.MessageBox(*args, **kwargs)
def GetNumberFromUser(*args, **kwargs):
"""
GetNumberFromUser(String message, String prompt, String caption, long value,
long min=0, long max=100, Window parent=None,
Point pos=DefaultPosition) -> long
"""
return _misc_.GetNumberFromUser(*args, **kwargs)
def ColourDisplay(*args):
"""ColourDisplay() -> bool"""
return _misc_.ColourDisplay(*args)
def DisplayDepth(*args):
"""DisplayDepth() -> int"""
return _misc_.DisplayDepth(*args)
def GetDisplayDepth(*args):
"""GetDisplayDepth() -> int"""
return _misc_.GetDisplayDepth(*args)
def DisplaySize(*args):
"""DisplaySize() -> (width, height)"""
return _misc_.DisplaySize(*args)
def GetDisplaySize(*args):
"""GetDisplaySize() -> Size"""
return _misc_.GetDisplaySize(*args)
def DisplaySizeMM(*args):
"""DisplaySizeMM() -> (width, height)"""
return _misc_.DisplaySizeMM(*args)
def GetDisplaySizeMM(*args):
"""GetDisplaySizeMM() -> Size"""
return _misc_.GetDisplaySizeMM(*args)
def ClientDisplayRect(*args):
"""ClientDisplayRect() -> (x, y, width, height)"""
return _misc_.ClientDisplayRect(*args)
def GetClientDisplayRect(*args):
"""GetClientDisplayRect() -> Rect"""
return _misc_.GetClientDisplayRect(*args)
def SetCursor(*args, **kwargs):
"""SetCursor(Cursor cursor)"""
return _misc_.SetCursor(*args, **kwargs)
def GetXDisplay(*args):
"""
GetXDisplay() -> void
Returns a swigified pointer to the X11 display. Returns None on
other platforms.
"""
return _misc_.GetXDisplay(*args)
def BeginBusyCursor(*args, **kwargs):
"""BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)"""
return _misc_.BeginBusyCursor(*args, **kwargs)
def GetMousePosition(*args):
"""
GetMousePosition() -> Point
Get the current mouse position on the screen.
"""
return _misc_.GetMousePosition(*args)
def FindWindowAtPointer(*args):
"""
FindWindowAtPointer() -> Window
Returns the window currently under the mouse pointer, if it belongs to
this application. Otherwise it returns None.
"""
return _misc_.FindWindowAtPointer(*args)
def GetActiveWindow(*args):
"""
GetActiveWindow() -> Window
Get the currently active window of this application, or None
"""
return _misc_.GetActiveWindow(*args)
def GenericFindWindowAtPoint(*args, **kwargs):
"""GenericFindWindowAtPoint(Point pt) -> Window"""
return _misc_.GenericFindWindowAtPoint(*args, **kwargs)
def FindWindowAtPoint(*args, **kwargs):
"""FindWindowAtPoint(Point pt) -> Window"""
return _misc_.FindWindowAtPoint(*args, **kwargs)
def GetTopLevelParent(*args, **kwargs):
"""GetTopLevelParent(Window win) -> Window"""
return _misc_.GetTopLevelParent(*args, **kwargs)
def LaunchDefaultBrowser(*args, **kwargs):
"""
LaunchDefaultBrowser(String url) -> bool
Launches the user's default browser and tells it to open the location
at ``url``. Returns ``True`` if the application was successfully
launched.
"""
return _misc_.LaunchDefaultBrowser(*args, **kwargs)
def GetKeyState(*args, **kwargs):
"""
GetKeyState(int key) -> bool
Get the state of a key (true if pressed or toggled on, false if not.)
This is generally most useful getting the state of the modifier or
toggle keys. On some platforms those may be the only keys that this
function is able to detect.
"""
return _misc_.GetKeyState(*args, **kwargs)
class MouseState(object):
"""
`wx.MouseState` is used to hold information about mouse button and
modifier key states and is what is returned from `wx.GetMouseState`.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self) -> MouseState
`wx.MouseState` is used to hold information about mouse button and
modifier key states and is what is returned from `wx.GetMouseState`.
"""
_misc_.MouseState_swiginit(self,_misc_.new_MouseState(*args, **kwargs))
__swig_destroy__ = _misc_.delete_MouseState
__del__ = lambda self : None;
def GetX(*args, **kwargs):
"""GetX(self) -> int"""
return _misc_.MouseState_GetX(*args, **kwargs)
def GetY(*args, **kwargs):
"""GetY(self) -> int"""
return _misc_.MouseState_GetY(*args, **kwargs)
def LeftDown(*args, **kwargs):
"""LeftDown(self) -> bool"""
return _misc_.MouseState_LeftDown(*args, **kwargs)
def MiddleDown(*args, **kwargs):
"""MiddleDown(self) -> bool"""
return _misc_.MouseState_MiddleDown(*args, **kwargs)
def RightDown(*args, **kwargs):
"""RightDown(self) -> bool"""
return _misc_.MouseState_RightDown(*args, **kwargs)
def ControlDown(*args, **kwargs):
"""ControlDown(self) -> bool"""
return _misc_.MouseState_ControlDown(*args, **kwargs)
def ShiftDown(*args, **kwargs):
"""ShiftDown(self) -> bool"""
return _misc_.MouseState_ShiftDown(*args, **kwargs)
def AltDown(*args, **kwargs):
"""AltDown(self) -> bool"""
return _misc_.MouseState_AltDown(*args, **kwargs)
def MetaDown(*args, **kwargs):
"""MetaDown(self) -> bool"""
return _misc_.MouseState_MetaDown(*args, **kwargs)
def CmdDown(*args, **kwargs):
"""CmdDown(self) -> bool"""
return _misc_.MouseState_CmdDown(*args, **kwargs)
def SetX(*args, **kwargs):
"""SetX(self, int x)"""
return _misc_.MouseState_SetX(*args, **kwargs)
def SetY(*args, **kwargs):
"""SetY(self, int y)"""
return _misc_.MouseState_SetY(*args, **kwargs)
def SetLeftDown(*args, **kwargs):
"""SetLeftDown(self, bool down)"""
return _misc_.MouseState_SetLeftDown(*args, **kwargs)
def SetMiddleDown(*args, **kwargs):
"""SetMiddleDown(self, bool down)"""
return _misc_.MouseState_SetMiddleDown(*args, **kwargs)
def SetRightDown(*args, **kwargs):
"""SetRightDown(self, bool down)"""
return _misc_.MouseState_SetRightDown(*args, **kwargs)
def SetControlDown(*args, **kwargs):
"""SetControlDown(self, bool down)"""
return _misc_.MouseState_SetControlDown(*args, **kwargs)
def SetShiftDown(*args, **kwargs):
"""SetShiftDown(self, bool down)"""
return _misc_.MouseState_SetShiftDown(*args, **kwargs)
def SetAltDown(*args, **kwargs):
"""SetAltDown(self, bool down)"""
return _misc_.MouseState_SetAltDown(*args, **kwargs)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -