wxWindow
wxWindow ¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¦¥£¥ó¥É¥¦¤Î¥Ù¡¼¥¹¥¯¥é¥¹¤Ç¤¢¤ë¡£
¥¦¥£¥ó¥É¥¦¼«¿È¤¬¥Ç¥ê¡¼¥È¤µ¤ì¤ëÁ°¤Ë¡¢¥¦¥£¥ó¥É¥¦¤Î¤¢¤é¤æ¤ë»Ò¤Ï¡¢
¥Ç¥¹¥È¥é¥¯¥¿¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë¥Ç¥ê¡¼¥È¤µ¤ì¤ë¤À¤í¤¦¡£
wxWindow is the base class for all windows. Any children of the window will be deleted
automatically by the destructor before the window itself is deleted.
Derived from
wxEvtHandler
wxObject
Include files
<wx/window.h>
Window styles
ÆÃÊ̤ʥ¦¥£¥ó¥É¥¦¥¯¥é¥¹¤ä¡¢¤¹¤Ù¤Æ¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¡¢¾ï¤Ë°ÕÌ£¤òÀ®¤¹¤ï¤±¤Ç¤Ï¤Ê¤¤¤¬¡¢
¼¡¤Î¥¹¥¿¥¤¥ë¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ËŬÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
The following styles can apply to all windows, although they will not always make sense for a particular
window class or on all platforms.
wxSIMPLE_BORDER
|
¥¦¥£¥ó¥É¥¦¤Î¼þ¤ê¤ËºÙ¤¤¥Ü¡¼¥À¡¼¤òɽ¼¨¤¹¤ë¡£
wxBORDER¤Ï¡¢¤³¤Î¥¹¥¿¥¤¥ë¤Î¸Å¤¤Ì¾Á°¤Ç¤¢¤ë¡£
Displays a thin border around the window. wxBORDER is the old name
for this style.
|
wxDOUBLE_BORDER
|
Æó½Å¤Î¥Ü¡¼¥À¡¼¤òɽ¼¨¤¹¤ë¡£Windows¤Î¤ß¡£
Displays a double border. Windows only.
|
wxSUNKEN_BORDER
|
¤¯¤Ü¤ó¤À¥Ü¡¼¥À¡¼¤òɽ¼¨¤¹¤ë¡£
Displays a sunken border.
|
wxRAISED_BORDER
|
É⤽Ф·¤Î¥Ü¡¼¥À¡¼¤òɽ¼¨¤¹¤ë¡£GTK¤Î¤ß¡£
Displays a raised border. GTK only.
|
wxSTATIC_BORDER
|
¥¹¥¿¥Æ¥£¥Ã¥¯¥³¥ó¥È¥í¡¼¥ë¤ËŬ¤·¤¿¥Ü¡¼¥À¡¼¤òɽ¼¨¤¹¤ë¡£Windows¤Î¤ß¡£
Displays a border suitable for a static control. Windows only.
|
wxTRANSPARENT_WINDOW
|
¥¦¥£¥ó¥É¥¦¤ÏÆ©ÌÀ¤Ç¤¢¤ë¡¢¤¹¤Ê¤ï¤Á¥Ú¥¤¥ó¥È¥¤¥Ù¥ó¥È¤ò¼õ¤±¼è¤é¤Ê¤¤¤À¤í¤¦¡£
Windows¤Î¤ß¡£
The window is transparent, that is, it will not receive paint
events. Windows only.
|
wxNO_3D
|
¡Öapplication-wide policy¡×¤¬£³£Ä¥³¥ó¥È¥í¡¼¥ë¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤Ã¤¿¤È¤·¤Æ¤â¡¢
¤³¤Î¥¦¥£¥ó¥É¥¦¤Î»Ò¤¬¡¢£³£Ä¥¹¥¿¥¤¥ë¤Ë¤Ê¤ë¤Î¤ò˸¤²¤ë¡£
Windows¤Î¤ß¡£
Prevents the children of this window taking on 3D styles, even though
the application-wide policy is for 3D controls. Windows only.
|
wxTAB_TRAVERSAL
|
¥Î¥ó¥À¥¤¥¢¥í¥°¥¦¥£¥ó¥É¥¦¤Ç¥¿¥Ö¥È¥é¥Ð¡¼¥µ¥ë¤ò²Äǽ¤Ë¤¹¤ë¡£
Use this to enable tab traversal for non-dialog windows.
|
wxWANTS_CHARS
|
¥¦¥£¥ó¥É¥¦¤¬¡¢¤¹¤Ù¤Æ¤Î char event ¤òÆÀ¤¿¤¤¤³¤È¤ò¼¨¤¹¡£
¡Ê¤¿¤¤¤Æ¤¤¤Ï¡¢¥À¥¤¥¢¥í¥°¥Ê¥Ó¥²¡¼¥·¥ç¥ó¤Î¤¿¤á¤Ë»È¤ï¤ì¡¢
¤½¤·¤Æ¡¢¤³¤Î¥¹¥¿¥¤¥ë̵¤·¤Ç¤ÏȯÀ¸¤·¤Ê¤¤¡¢TAB¤äENTER¤Î¤è¤¦¤Ê¥¡¼¤Ç¤µ¤¨¡Ë
Use this to indicate that the window
wants to get all char events - even for keys like TAB or ENTER which are
usually used for dialog navigation and which wouldn't be generated without
this style
|
wxNO_FULL_REPAINT_ON_RESIZE
|
¥ê¥µ¥¤¥º»þ¤Î¡¢´°Á´¤Ê¥¦¥£¥ó¥É¥¦¤ÎºÆÉÁ²è¤ò̵¸ú¤Ë¤¹¤ë¡£
¤³¤Î¥¹¥¿¥¤¥ë¤ò»È¤¦¾ì¹ç¤Ï¡¢¼êư¤Ç¿·¤·¤¤¥¦¥£¥ó¥É¥¦Îΰè¤òºÆÉÁ²è¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤À¤í¤¦¡£
¸½ºß¤Ï¡¢Windows¤Î¤ß¸ú²Ì¤¬¤¢¤ë¡£
Disables repainting
the window completely when its size is changed - you will have to repaint the
new window area manually if you use this style. Currently only has an effect for
Windows.
|
wxVSCROLL
|
¿âľ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ò͸ú¤Ë¤¹¤ë¡Ê¤Þ¤À»È¤ï¤ì¤Æ¤¤¤ë¡©¡Ë
Use this style to enable a vertical scrollbar. (Still used?)
|
wxHSCROLL
|
¿åÊ¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ò͸ú¤Ë¤¹¤ë¡Ê¤Þ¤À»È¤ï¤ì¤Æ¤¤¤ë¡©¡Ë
Use this style to enable a horizontal scrollbar. (Still used?)
|
wxCLIP_CHILDREN
|
»Ò¤¬ÉÁ²è¤µ¤ì¤ë¤È¤¤Ë¡¢
ÇØ·Ê¤¬ºÆÉÁ²è¤µ¤ì¤ë¤³¤È¤Ë¤è¤Ã¤Æµ¯¤³¤ë¡Ö¤Á¤é¤Ä¤¡×¤ò½üµî¤¹¤ë¡£
Use this style to eliminate flicker caused by the background being
repainted, then children being painted over them. Windows only.
|
See also window styles overview.
See also
Event handling overview
Members
wxWindow::wxWindow
wxWindow::~wxWindow
wxWindow::AddChild
wxWindow::CaptureMouse
wxWindow::Center
wxWindow::CenterOnParent
wxWindow::CenterOnScreen
wxWindow::Centre
wxWindow::CentreOnParent
wxWindow::CentreOnScreen
wxWindow::Clear
wxWindow::ClientToScreen
wxWindow::Close
wxWindow::ConvertDialogToPixels
wxWindow::ConvertPixelsToDialog
wxWindow::Destroy
wxWindow::DestroyChildren
wxWindow::Disable
wxWindow::DragAcceptFiles
wxWindow::Enable
wxWindow::FindFocus
wxWindow::FindWindow
wxWindow::FindWindowById
wxWindow::FindWindowByName
wxWindow::FindWindowByLabel
wxWindow::Fit
wxWindow::FitInside
wxWindow::Freeze
wxWindow::GetAdjustedBestSize
wxWindow::GetBackgroundColour
wxWindow::GetBestSize
wxWindow::GetCaret
wxWindow::GetCapture
wxWindow::GetCharHeight
wxWindow::GetCharWidth
wxWindow::GetChildren
wxWindow::GetClientSize
wxWindow::GetConstraints
wxWindow::GetContainingSizer
wxWindow::GetDropTarget
wxWindow::GetEventHandler
wxWindow::GetExtraStyle
wxWindow::GetFont
wxWindow::GetForegroundColour
wxWindow::GetGrandParent
wxWindow::GetHandle
wxWindow::GetHelpText
wxWindow::GetId
wxWindow::GetLabel
wxWindow::GetName
wxWindow::GetParent
wxWindow::GetPosition
wxWindow::GetRect
wxWindow::GetScrollThumb
wxWindow::GetScrollPos
wxWindow::GetScrollRange
wxWindow::GetSize
wxWindow::GetSizer
wxWindow::GetTextExtent
wxWindow::GetTitle
wxWindow::GetUpdateRegion
wxWindow::GetValidator
wxWindow::GetVirtualSize
wxWindow::GetWindowStyleFlag
wxWindow::HasCapture
wxWindow::Hide
wxWindow::InitDialog
wxWindow::IsEnabled
wxWindow:IsExposed
wxWindow::IsRetained
wxWindow::IsShown
wxWindow::IsTopLevel
wxWindow::Layout
wxWindow::LoadFromResource
wxWindow::Lower
wxWindow::MakeModal
wxWindow::Move
wxWindow::PopEventHandler
wxWindow::PopupMenu
wxWindow::PushEventHandler
wxWindow::Raise
wxWindow::Refresh
wxWindow::RefreshRect
wxWindow::ReleaseMouse
wxWindow::RemoveChild
wxWindow::RemoveEventHandler
wxWindow::Reparent
wxWindow::ScreenToClient
wxWindow::ScrollLines
wxWindow::ScrollPages
wxWindow::ScrollWindow
wxWindow::SetAcceleratorTable
wxWindow::SetAutoLayout
wxWindow::SetBackgroundColour
wxWindow::SetCaret
wxWindow::SetClientSize
wxWindow::SetContainingSizer
wxWindow::SetCursor
wxWindow::SetConstraints
wxWindow::SetDropTarget
wxWindow::SetEventHandler
wxWindow::SetExtraStyle
wxWindow::SetFocus
wxWindow::SetFocusFromKbd
wxWindow::SetFont
wxWindow::SetForegroundColour
wxWindow::SetHelpText
wxWindow::SetId
wxWindow::SetName
wxWindow::SetPalette
wxWindow::SetScrollbar
wxWindow::SetScrollPos
wxWindow::SetSize
wxWindow::SetSizeHints
wxWindow::SetSizer
wxWindow::SetSizerAndFit
wxWindow::SetTitle
wxWindow::SetThemeEnabled
wxWindow::SetValidator
wxWindow::SetToolTip
wxWindow::GetToolTip
wxWindow::SetVirtualSize
wxWindow::SetVirtualSizeHints
wxWindow::SetWindowStyle
wxWindow::SetWindowStyleFlag
wxWindow::Show
wxWindow::Thaw
wxWindow::TransferDataFromWindow
wxWindow::TransferDataToWindow
wxWindow::Update
wxWindow::Validate
wxWindow::WarpPointer
wxWindow::wxWindow
wxWindow()
wxWindow(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
¥Õ¥ì¡¼¥à¡¢¥À¥¤¥¢¥í¥°¡¢¤Þ¤¿¤Ï¡¢Â¾¤Î¤¢¤é¤æ¤ëÈó¥³¥ó¥È¥í¡¼¥ë¥¦¥£¥ó¥É¥¦¤Î»Ò¤Ë¤Ê¤ì¤ë
¥¦¥£¥ó¥É¥¦¤ò¹½ÃÛ¤¹¤ë¡£
Constructs a window, which can be a child of a frame, dialog or any other non-control window.
Parameters
parent
id
¥¦¥£¥ó¥É¥¦£É£Ä¡£-1 ¤Ê¤é¡¢¼«Æ°Åª¤Ë£É£Ä¤òºîÀ®¤¹¤ë¡£
Window identifier. If -1, will automatically create an identifier.
pos
¥¦¥£¥ó¥É¥¦¤Î°ÌÃÖ¡£
wxDefaultPosition¤ÎÃͤϡ¢wxWidgets¤¬¥Ç¥Õ¥©¥ë¥È¤Î°ÌÃÖ¤òÀ¸À®¤¹¤ë¤³¤È¤ò¼¨¤¹(-1, -1)¡£
wxWidgets¥¯¥é¥¹¤òľÀܻȤäƤ¤¤ë¤Ê¤é¡¢¼ÂºÝ¤Î°ÌÃÖ¤òÍ¿¤¨¤Ê¤µ¤¤¡£
Window position. wxDefaultPosition is (-1, -1) which indicates that wxWidgets
should generate a default position for the window. If using the wxWindow class directly, supply
an actual position.
size
¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¡£
wxDefaultSize¤ÎÃͤϡ¢wxWidgets¤¬¥Ç¥Õ¥©¥ë¥È¤Î°ÌÃÖ¤òÀ¸À®¤¹¤ë¤³¤È¤ò¼¨¤¹(-1, -1)¡£
¥µ¥¤¥º¤¬ÉÔŬÅö¤Ê¤é¡¢¥¦¥£¥ó¥É¥¦¤¬20x20¥Ô¥¯¥»¥ë¤Ë¤¢¤ï¤»¤é¤ì¤¿¤«¤é¤À¤í¤¦¡£
¤·¤¿¤¬¤Ã¤Æ¡¢¥¦¥£¥ó¥É¥¦¤Ïɽ¼¨¤µ¤ì¤ë¤¬¡¢ÌÀ¤é¤«¤ËÀµ¤·¤¤¥µ¥¤¥º¤Ç¤Ï¤Ê¤¤¡£
Window size. wxDefaultSize is (-1, -1) which indicates that wxWidgets
should generate a default size for the window. If no suitable size can be found, the
window will be sized to 20x20 pixels so that the window is visible but obviously not
correctly sized.
style
¥¦¥£¥ó¥É¥¦¤Î¥¹¥¿¥¤¥ë¡£
°ìÈÌŪ¤Ê¥¦¥£¥ó¥É¥¦¥¹¥¿¥¤¥ë¡£
wxWindow¤ò¸«¤Æ¤¯¤ì¡£
Window style. For generic window styles, please see
wxWindow.
name
¥¦¥£¥ó¥É¥¦Ì¾¡£
Window name.
wxWindow::~wxWindow
~wxWindow()
¥Ç¥¹¥È¥é¥¯¥¿¡£¼«Ê¬¼«¿È¤¬¥Ç¥ê¡¼¥È¤µ¤ì¤ë¤È¤¤Ë¡¢¤¹¤Ù¤Æ¤Î¥µ¥Ö¥¦¥£¥ó¥É¥¦¤ò¥Ç¥ê¡¼¥È¤¹¤ë¡£
ÌÀ¼¨Åª¤Ë
delete±é»»»Ò¤ò»È¤¦Âå¤ï¤ê¤Ë¡¢
ÉáÄ̤ϡ¢
wxWindow::Destroy¤ò»È¤¦¤Ù¤¤Ç¤¢¤ë¡£
¤½¤¦¤¹¤ë¤³¤È¤Ç¡¢wxWidgets¤Ï¡¢¥¢¥¤¥É¥ë¥¿¥¤¥à»þ¤Î°ÂÁ´¤Ê¤È¤¤Ë¤Î¤ß¡¢¥¦¥£¥ó¥É¥¦¤ò¥Ç¥ê¡¼¥È¤Ç¤¤ë¡£
Destructor. Deletes all subwindows, then deletes itself. Instead of using
the
delete operator explicitly, you should normally
use
wxWindow::Destroy so that wxWidgets
can delete a window only when it is safe to do so, in idle time.
See also
Window deletion overview,
wxWindow::Destroy,
wxCloseEvent
wxWindow::AddChild
virtual void AddChild(wxWindow* child)
»Ò¥¦¥£¥ó¥É¥¦¤òÄɲ乤롣
¤³¤ì¤Ï¡¢¥¦¥£¥ó¥É¥¦ºîÀ®´Ø¿ô¤Ë¤è¤Ã¤Æ¡¢¼«Æ°Åª¤Ë¸Æ¤Ð¤ì¤ë¡£
¤À¤«¤é¡¢¥×¥í¥°¥é¥Þ¤¬¸Æ¤Ö¤Ù¤¤Ç¤Ê¤¤¡£
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
Parameters
child
Äɲ乤ë»Ò¥¦¥£¥ó¥É¥¦¡£
Child window to add.
wxWindow::CaptureMouse
virtual void CaptureMouse()
¤¹¤Ù¤Æ¤Î¥Þ¥¦¥¹ÆþÎϤò¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¸þ¤±¤ë¡£
¥¥ã¥×¥Á¥ã¤òÊü¤¹¤¿¤á¤Ë¤Ï¡¢
wxWindow::ReleaseMouse¤ò¸Æ¤Ö¡£
¥á¥â¡§wxWidgets¤Ï¡¢¥¦¥£¥ó¥É¥¦¤¬¥Þ¥¦¥¹¤ò¥¥ã¥×¥Á¥ã¤·¤Æ¤¤¤ë¥¹¥¿¥Ã¥¯¤òÊÝ»ý¤·¡¢
¥Þ¥¦¥¹¤¬Êü¤µ¤ì¤¿¤È¤¡¢¥¥ã¥×¥Á¥ã¤Ï¡¢°ÊÁ°¤Ë¥Þ¥¦¥¹¤ò¥¥ã¥×¥Á¥ã¤·¤¿¥¦¥£¥ó¥É¥¦¤ËÌ᤹¡£
¤½¤·¤Æ¡¢°ÊÁ°¤Î¥¦¥£¥ó¥É¥¦¤¬¤Ê¤¤¤Ê¤é¡¢Êü¤µ¤ì¤ë¡£
ÆÃ¤Ë¡¢¤³¤Î¤³¤È¤Ï¡¢¥Þ¥¦¥¹¤ò¥¥ã¥×¥Á¥ã¤¹¤ë¤Î¤ÈƱ¤¸¤À¤±¡¢¥Þ¥¦¥¹¤òÊü¤µ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
Directs all mouse input to this window. Call
wxWindow::ReleaseMouse to
release the capture.
Note that wxWidgets maintains the stack of windows having captured the mouse
and when the mouse is released the capture returns to the window which had had
captured it previously and it is only really released if there were no previous
window. In particular, this means that you must release the mouse as many times
as you capture it.
See also
wxWindow::ReleaseMouse
wxWindow::Center
void Center(int direction)
wxWindow::CenterOnParent
void CenterOnParent(int direction)
wxWindow::CenterOnScreen
void CenterOnScreen(int direction)
wxWindow::Centre
void Centre(int direction = wxBOTH)
¥¦¥£¥ó¥É¥¦¤òÃæ±û¤ËÃÖ¤¯¡£
Parameters
direction
¥»¥ó¥¿¥ê¥ó¥°¤¹¤ëÊý¸þ¤ò»ØÄꤹ¤ë¡£
wxHORIZONTAL¡¢wxVERTICAL ¤Þ¤¿¤Ï¡¢wxBOTH¡£
¥¦¥£¥ó¥É¥¦¤ò¡¢¿Æ¤Î¥¦¥£¥ó¥É¥¦¤Ç¤Ï¤Ê¤¯¡¢¥¹¥¯¥ê¡¼¥óÁ´ÂΤÇÃæ±û¤Ë¤ª¤¤¿¤¤¤Ê¤é¡¢
wxCENTRE_ON_SCREEN¥Õ¥é¥°¤â´Þ¤á¤Æ¤è¤¤¡£
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH. It may also include wxCENTRE_ON_SCREEN flag
if you want to center the window on the entire screen and not on its
parent window.
wxCENTRE_FRAME ¥Õ¥é¥°¤Ï¸Å¤¤¤Î¤Ç¡¢»È¤¦¤Ù¤¤Ç¤Ï¤Ê¤¤¡Ê¤½¤Î¥Õ¥é¥°¤Ï¡¢¸ú²Ì¤¬¤Ê¤¤¡Ë
The flag
wxCENTRE_FRAME is obsolete and should not be used any longer
(it has no effect).
Remarks
¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¡Ê¿Æ¤ò»ý¤¿¤Ê¤¤¥¦¥£¥ó¥É¥¦¡Ë¤Ê¤é¡¢
¤¤¤º¤ì¤Ë¤·¤Æ¤â¥¹¥¯¥ê¡¼¥ó¤ÎÃæ±û¤ËÃÖ¤«¤ì¤ë¤À¤í¤¦¡£
If the window is a top level one (i.e. doesn't have a parent), it will be
centered relative to the screen anyhow.
See also
wxWindow::Center
wxWindow::CentreOnParent
void CentreOnParent(int direction = wxBOTH)
¥¦¥£¥ó¥É¥¦¤ò¿Æ¤Î¾å¤ÇÃæ±û¤ËÃÖ¤¯¡£
¤³¤ì¤Ï¡¢
Centre¤Î¤µ¤é¤ËÆÉ¤ß¤ä¤¹¤¤Æ±µÁ¸ì¤Ç¤¢¤ë¡£
Centres the window on its parent. This is a more readable synonym for
Centre.
Parameters
direction
¥»¥ó¥¿¥ê¥ó¥°¤¹¤ëÊý¸þ¤ò»ØÄꤹ¤ë¡£
wxHORIZONTAL¡¢wxVERTICAL ¤Þ¤¿¤Ï¡¢wxBOTH¡£
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH.
Remarks
¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢¥¹¥¯¥ê¡¼¥óÁ´ÂΤÎÂå¤ï¤ê¤Ë¤½¤ì¤é¤Î¿Æ¤Î¾å¤Ç¡¢
¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤òÃæ±û¤ËÇÛÃÖ¤¹¤ëÊýË¡¤òÄ󶡤¹¤ë¡£
¿Æ¤¬¤Ê¤¤¤«¡¢¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢
wxWindow::Centre¤ÈƱ¤¸¤è¤¦¤Ë¿¶Éñ¤¦¡£
This methods provides for a way to center top level windows over their
parents instead of the entire screen. If there is no parent or if the
window is not a top level window, then behaviour is the same as
wxWindow::Centre.
See also
wxWindow::CentreOnScreen
wxWindow::CentreOnScreen
void CentreOnScreen(int direction = wxBOTH)
¥¦¥£¥ó¥É¥¦¤ò¥¹¥¯¥ê¡¼¥ó¾å¤ÇÃæ±û¤ËÇÛÃÖ¤¹¤ë¡£
¤³¤ì¤Ï¡¢¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤Ç¤Î¤ßƯ¤¯¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¤Þ¤À¤½¤Î¿Æ¤ÎÃæ±û¤ËÇÛÃÖ¤µ¤ì¤ë¤À¤í¤¦¡£
Centres the window on screen. This only works for top level windows -
otherwise, the window will still be centered on its parent.
Parameters
direction
¥»¥ó¥¿¥ê¥ó¥°¤¹¤ëÊý¸þ¤ò»ØÄꤹ¤ë¡£
wxHORIZONTAL¡¢wxVERTICAL ¤Þ¤¿¤Ï¡¢wxBOTH¡£
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH.
See also
wxWindow::CentreOnParent
wxWindow::Clear
void Clear()
ÇØ·Ê¿§¤ÇÅɤê¤Ä¤Ö¤¹¤³¤È¤Ç¡¢¥¦¥£¥ó¥É¥¦¤ò¥¯¥ê¥¢¤¹¤ë¡£
À¸À®¤µ¤ì¤¿ erase background ¥¤¥Ù¥ó¥È¤ò¤ª¤³¤µ¤Ê¤¤¡£
Clears the window by filling it with the current background colour. Does not
cause an erase background event to be generated.
wxWindow::ClientToScreen
virtual void ClientToScreen(int* x, int* y) const
wxPerl note:
wxPerl¤Ç¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢°ú¿ô¤ò½¤Àµ¤¹¤ëÂå¤ï¤ê¤Ë¡¢£²¤Ä¤ÎÍ×ÁǤΥꥹ¥È¤òÊÖ¤¹¡£
wxPerl note: In wxPerl this method returns a 2-element list instead of
modifying its parameters.
virtual wxPoint ClientToScreen(const wxPoint& pt) const
¤³¤Î¥¦¥£¥ó¥É¥¦¤ÎÁêÂкÂɸ¤«¤é¡¢¥¹¥¯¥ê¡¼¥óºÂɸ¤ËÊÑ´¹¤¹¤ë¡£
Converts to screen coordinates from coordinates relative to this window.
x
£ØºÂɸ¤ÎÀ°¿ôÃͤؤΥݥ¤¥ó¥¿¡£
¥¯¥é¥¤¥¢¥ó¥È¤ÎºÂɸ¤òÆþ¤ì¤ë¤È¡¢¥¹¥¯¥ê¡¼¥óºÂɸ¤¬½Ð¤Æ¤¯¤ë¡£
A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
a screen coordinate will be passed out.
y
£ÙºÂɸ¤ÎÀ°¿ôÃͤؤΥݥ¤¥ó¥¿¡£
¥¯¥é¥¤¥¢¥ó¥È¤ÎºÂɸ¤òÆþ¤ì¤ë¤È¡¢¥¹¥¯¥ê¡¼¥óºÂɸ¤¬½Ð¤Æ¤¯¤ë¡£
A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
a screen coordinate will be passed out.
pt
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
ClientToScreen(point)
|
¼õ¤±¼è¤ê¡¢¤½¤·¤ÆwxPoint¤òÊÖ¤¹¡£
Accepts and returns a wxPoint
|
ClientToScreenXY(x, y)
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥¿¥×¥ë(x, y)¤òÊÖ¤¹¡£
Returns a 2-tuple, (x, y)
|
wxWindow::Close
virtual bool Close(bool force = FALSE)
¤³¤Î¥á¥½¥Ã¥É¤ÎÌÜŪ¤Ï¡¢delete ±é»»»Ò¤ò»È¤¦¤è¤ê¤â°ÂÁ´¤Ë¡¢
¥¦¥£¥ó¥É¥¦¤òÇ˲õ¤¹¤ëÊýË¡¤òÄ󶡤¹¤ë¤³¤È¤Ç¤¹¡£
The purpose of this call is to provide a safer way of destroying a window than using
the
delete operator.
Parameters
force
¥¦¥£¥ó¥É¥¦¤Î¥¯¥í¡¼¥º¥Ï¥ó¥É¥é¤¬¡¢¥¦¥£¥ó¥É¥¦¤ÎÇ˲õ¤òµñÈݤǤ¤ë¤Ù¤¤Ê¤é¡¢FALSE¡£
¤Ç¤¤Ê¤¤¤Î¤Ê¤é¡¢TRUE¡£
FALSE if the window's close handler should be able to veto the destruction
of this window, TRUE if it cannot.
Remarks
Close ¤Ï¡¢¥¦¥£¥ó¥É¥¦¤òÇ˲õ¤¹¤ë¤«¤É¤¦¤«¤ò·è¤á¤ëµ¡²ñ¤òÄ󶡤¹¤ë¥¦¥£¥ó¥É¥¦¤Î¤¿¤á¤Ë¡¢
close handler ¤ò¸Æ¤Ö¡£
wxWindow::Destroy ¤ò»È¤¦¤³¤È¤Ë¤è¤Ã¤Æ¡¢
¥¦¥£¥ó¥É¥¦¤òÇ˲õ¤¹¤Ù¤¾ì¹ç¡¢¥¯¥í¡¼¥º¥Ï¥ó¥É¥é¤Ï¡¢
wxCloseEvent::GetForce ¤ò»È¤Ã¤Æ¡¢
¥¦¥£¥ó¥É¥¦¤¬¶¯À©Åª¤Ë¥Ç¥ê¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤Ù¤¤Ç¤¢¤ë¡£
´ÉÍý¤µ¤ì¤¿¥¦¥£¥ó¥É¥¦¡ÊwxFrame ¤È wxDialog ¥¯¥é¥¹¡Ë¤Ë¤Î¤ß»ÈÍѤ¹¤ë¡£
¥á¥â¡§ Close ¤ò¸Æ¤Ö¤³¤È¤Ï¡¢¥¦¥£¥ó¥É¥¦¤¬Ç˲õ¤µ¤ì¤ë¤Î¤òÊݾڤ¹¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£
¤·¤«¤·¡¢¥¦¥£¥ó¥É¥¦¤ò¼êư¤ÇÊĤ¸¤ëÁàºî¤ò¥·¥ß¥å¥ì¡¼¥È¤¹¤ëÊýË¡¤òÄ󶡤¹¤ë¡£
¤½¤ì¤Ï¡¢¥¦¥£¥ó¥É¥¦¤òÇ˲õ¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¼ÂÁõ¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¤·¡¢¤½¤¦¤Ç¤Ê¤¤¤«¤â¤·¤ì¤Ê¤¤¡£
wxDialog::OnCloseWindow ¤Î¥Ç¥Õ¥©¥ë¥È¤Î¼ÂÁõ¤Ï¡¢¥À¥¤¥¢¥í¥°¤ò¤«¤Ê¤é¤º¤·¤â¥Ç¥ê¡¼¥È¤¹¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£
ñ½ã¤Ë¡¢¥À¥¤¥¢¥í¥°¤ò±£¤¹¤À¤±¤Î wxID_CANCEL ¥¤¥Ù¥ó¥È¤ò¥·¥ß¥å¥ì¡¼¥È¤¹¤ë¤«¤é¤À¡£
¥¦¥£¥ó¥É¥¦¤¬Ç˲õ¤µ¤ì¤ë¤Î¤òÊݾڤ¹¤ë¤¿¤á¤Ë¤Ï¡¢
wxWindow::Destroy ¤ò¸Æ¤Ó¤Ê¤µ¤¤¡£
Close calls the
close handler for the window, providing an opportunity for the window to
choose whether to destroy the window.
The close handler should check whether the window is being deleted forcibly,
using wxCloseEvent::GetForce, in which case it should
destroy the window using wxWindow::Destroy.
Applies to managed windows (wxFrame and wxDialog classes) only.
Note that calling Close does not guarantee that the window will be destroyed; but it
provides a way to simulate a manual close of a window, which may or may not be implemented by
destroying the window. The default implementation of wxDialog::OnCloseWindow does not
necessarily delete the dialog, since it will simply simulate an wxID_CANCEL event which
itself only hides the dialog.
To guarantee that the window will be destroyed, call wxWindow::Destroy instead.
See also
Window deletion overview,
wxWindow::Destroy,
wxCloseEvent
wxWindow::ConvertDialogToPixels
wxPoint ConvertDialogToPixels(const wxPoint& pt)
wxSize ConvertDialogToPixels(const wxSize& sz)
¥À¥¤¥¢¥í¥°Ã±°Ì¤Î°ÌÃ֤䥵¥¤¥º¤ò¥Ô¥¯¥»¥ëñ°Ì¤ËÊÑ´¹¤¹¤ë¡£
£Ø¤ÎÂ礤µ¤Ï¡¢¥À¥¤¥¢¥í¥°Ã±°Ì¤Ë¡¢Ê¸»ú¤ÎÉý¤ÎÊ¿¶Ñ¤ò³Ý¤±¤Æ¡¢£´¤Ç³ä¤ë¡£
£Ù¤ÎÂ礤µ¤Ï¡¢¥À¥¤¥¢¥í¥°Ã±°Ì¤Ë¡¢Ê¸»ú¤Î¹â¤µ¤ÎÊ¿¶Ñ¤ò³Ý¤±¤Æ¡¢£¸¤Ç³ä¤ë¡£
Converts a point or size from dialog units to pixels.
For the x dimension, the dialog units are multiplied by the average character width
and then divided by 4.
For the y dimension, the dialog units are multiplied by the average character height
and then divided by 8.
Remarks
¥À¥¤¥¢¥í¥°Ã±°Ì¤Ï¡¢¥Õ¥©¥ó¥È¤¬ÊѤï¤Ã¤Æ¤â¡¢ÈæÎ¨¤ò°Ý»ý¤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
Dialog Editor ¤ÇºîÀ®¤µ¤ì¤¿¥À¥¤¥¢¥í¥°¤Ï¡¢Ç¤°Õ¤Ç¥À¥¤¥¢¥í¥°Ã±°Ì¤ò»È¤¦
¥×¥í¥°¥é¥àÆâ¤Ç¡¢¤³¤ì¤é¤Î´Ø¿ô¤ò»È¤¦¤³¤È¤â¤Ç¤¤ë¡£
ÊØÍø¤Ê¥Þ¥¯¥íÄêµÁ¡§
Dialog units are used for maintaining a dialog's proportions even if the font changes.
Dialogs created using Dialog Editor optionally use dialog units.
You can also use these functions programmatically. A convenience macro is defined:
#define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
See also
wxWindow::ConvertPixelsToDialog
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython ¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
ConvertDialogPointToPixels(point)
|
¼õ¤±¼è¤ê¡¢¤½¤·¤Æ wxPoint ¤òÊÖ¤¹¡£
Accepts and returns a wxPoint
|
ConvertDialogSizeToPixels(size)
|
¼õ¤±¼è¤ê¡¢¤½¤·¤Æ wxSize ¤òÊÖ¤¹¡£
Accepts and returns a wxSize
|
¤µ¤é¤Ë¡¢¼¡¤Î¥Ø¥ë¥Ñ¡¼´Ø¿ô¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
Additionally, the following helper functions are defined:
wxDLG_PNT(win, point)
|
¥À¥¤¥¢¥í¥°Ã±°Ì¤Î wxPoint ¤ò¥Ô¥¯¥»¥ëñ°Ì¤ËÊÑ´¹¤¹¤ë¡£
Converts a wxPoint from dialog
units to pixels
|
wxDLG_SZE(win, size)
|
¥À¥¤¥¢¥í¥°Ã±°Ì¤Î wxSize ¤ò¥Ô¥¯¥»¥ëñ°Ì¤ËÊÑ´¹¤¹¤ë¡£
Converts a wxSize from dialog
units to pixels
|
wxWindow::ConvertPixelsToDialog
wxPoint ConvertPixelsToDialog(const wxPoint& pt)
wxSize ConvertPixelsToDialog(const wxSize& sz)
¥Ô¥¯¥»¥ëñ°Ì¤Î°ÌÃ֤䥵¥¤¥º¤ò¡¢¥À¥¤¥¢¥í¥°Ã±°Ì¤ËÊÑ´¹¤¹¤ë¡£
£Ø¤ÎÂ礤µ¤Ï¡¢¥Ô¥¯¥»¥ëñ°Ì¤Ë¡¢£´¤ò³Ý¤±¤Æ¡¢Ê¸»ú¤ÎÉý¤ÎÊ¿¶Ñ¤Ç³ä¤ë¡£
£Ù¤ÎÂ礤µ¤Ï¡¢¥Ô¥¯¥»¥ëñ°Ì¤Ë¡¢£¸¤ò³Ý¤±¤Æ¡¢Ê¸»ú¤Î¹â¤µ¤ÎÊ¿¶Ñ¤Ç³ä¤ë¡£
Converts a point or size from pixels to dialog units.
For the x dimension, the pixels are multiplied by 4 and then divided by the average
character width.
For the y dimension, the pixels are multiplied by 8 and then divided by the average
character height.
Remarks
¥À¥¤¥¢¥í¥°Ã±°Ì¤Ï¡¢¥Õ¥©¥ó¥È¤¬ÊѤï¤Ã¤Æ¤â¡¢ÈæÎ¨¤ò°Ý»ý¤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
Dialog Editor ¤ÇºîÀ®¤µ¤ì¤¿¥À¥¤¥¢¥í¥°¤Ï¡¢Ç¤°Õ¤Ç¥À¥¤¥¢¥í¥°Ã±°Ì¤ò»È¤¦
Dialog units are used for maintaining a dialog's proportions even if the font changes.
Dialogs created using Dialog Editor optionally use dialog units.
See also
wxWindow::ConvertDialogToPixels
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython ¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
ConvertDialogPointToPixels(point)
|
¼õ¤±¼è¤ê¡¢¤½¤·¤Æ wxPoint ¤òÊÖ¤¹¡£
Accepts and returns a wxPoint
|
ConvertDialogSizeToPixels(size)
|
¼õ¤±¼è¤ê¡¢¤½¤·¤Æ wxSize ¤òÊÖ¤¹¡£
Accepts and returns a wxSize
|
wxWindow::Destroy
virtual bool Destroy()
°ÂÁ´¤Ë¥¦¥£¥ó¥É¥¦¤òÇ˲õ¤¹¤ë¡£
°Û¤Ê¤ë¥¦¥£¥ó¥É¥¦¥¯¥é¥¹¤Ç¤Ï¡¢°Û¤Ê¤ëÊýË¡¤ÇÇ˲õ¤µ¤ìÆÀ¤ë¤Î¤Ç¡¢
delete ±é»»»Ò¤ò»È¤¦Âå¤ï¤ê¤Ë¤³¤Î´Ø¿ô¤ò»È¤¤¤Ê¤µ¤¤¡£
¥Õ¥ì¡¼¥à¤È¥À¥¤¥¢¥í¥°¤Ï¡¢¤³¤Î´Ø¿ô¤¬¸Æ¤Ð¤ì¤¿¤È¤¤Ë¡¢¤¹¤°¤ËÇ˲õ¤µ¤ì¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£
¤½¤ì¤é¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¦¥£¥ó¥É¥¦¥¤¥Ù¥ó¥È¤¬½èÍý¤µ¤ì¤¿¤È¤¤Ë¡¢
¥¢¥¤¥É¥ë¥¿¥¤¥à»þ¤Ë¥Ç¥ê¡¼¥È¤µ¤ì¤ë¤è¤¦¡¢¥¦¥£¥ó¥É¥¦¤Î¥ê¥¹¥È¤ËÄɲ䵤ì¤ë¡£
¤³¤ì¤Ï¡¢Â¸ºß¤·¤Ê¤¤¥¦¥£¥ó¥É¥¦¤Ø¥¤¥Ù¥ó¥È¤¬Á÷¤é¤ì¤ëÌäÂê¤òËɤ°¡£
Destroys the window safely. Use this function instead of the delete operator, since
different window classes can be destroyed differently. Frames and dialogs
are not destroyed immediately when this function is called - they are added
to a list of windows to be deleted on idle time, when all the window's events
have been processed. This prevents problems with events being sent to non-existent
windows.
Return value
¥Ç¥ê¡¼¥È¤¬À®¸ù¤¹¤ë¤«¡¢´û¤Ë¥¦¥£¥ó¥É¥¦¤Î¥Ç¥ê¡¼¥È¥ê¥¹¥È¤Ë²Ã¤¨¤é¤ì¤Æ¤¤¤¿¤é
TRUE¡£
TRUE if the window has either been successfully deleted, or it has been added
to the list of windows pending real deletion.
wxWindow::DestroyChildren
virtual void DestroyChildren()
¥¦¥£¥ó¥É¥¦¤Î¤¹¤Ù¤Æ¤Î»Ò¤òÇ˲õ¤¹¤ë¡£
¥Ç¥¹¥È¥é¥¯¥¿¤Ë¤è¤Ã¤Æ¡¢¼«Æ°Åª¤Ë¸Æ¤Ð¤ì¤ë¡£
Destroys all children of a window. Called automatically by the destructor.
wxWindow::Disable
void Disable()
Return value
¥¦¥£¥ó¥É¥¦¤¬¡¢Ìµ¸ú¤Ë¤Ê¤ì¤Ð TRUE¡£
¤³¤Î´Ø¿ô¤ò¸Æ¤ÖÁ°¤Ë¡¢´û¤Ë̵¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ì¤Ð FALSE¡£
Returns
TRUE if the window has been disabled,
FALSE if it had been
already disabled before the call to this function.
wxWindow::DragAcceptFiles
virtual void DragAcceptFiles(bool accept)
¥É¥í¥Ã¥×¥Õ¥¡¥¤¥ë¥¤¥Ù¥ó¥È(OnDropFiles)¤ò¼õ¤±¼è¤ë»ñ³Ê¤ò͸ú¡¢¤Þ¤¿¤Ï̵¸ú¤Ë¤¹¤ë¡£
Enables or disables eligibility for drop file events (OnDropFiles).
Parameters
accept
¥¦¥£¥ó¥É¥¦¤¬¥É¥í¥Ã¥×¥Õ¥¡¥¤¥ë¥¤¥Ù¥ó¥È¤ò¼õ¤±¼è¤ë¤Î¤Ë¤Õ¤µ¤ï¤·¤±¤ì¤Ð¡¢TRUE¡£
¥É¥í¥Ã¥×¥Õ¥¡¥¤¥ë¥¤¥Ù¥ó¥È¤ò¼õ¤±¼è¤é¤Ê¤¤¤Ê¤é¡¢FALSE¡£
If TRUE, the window is eligible for drop file events. If FALSE, the window
will not accept drop file events.
Remarks
Windows¤Î¤ß¡£
wxWindow::Enable
virtual bool Enable(bool enable = TRUE)
¥¦¥£¥ó¥É¥¦¤Î¥æ¡¼¥¶ÆþÎϤò͸ú¤Þ¤¿¤Ï̵¸ú¤Ë¤¹¤ë¡£
¥á¥â¡§¿Æ¥¦¥£¥ó¥É¥¦¤¬Ìµ¸ú¤Ë¤Ê¤Ã¤¿¤È¤¡¢¤¹¤Ù¤Æ¤Î»Ò¤Ï̵¸ú¤Ë¤Ê¤ê¡¢
¿Æ¤¬ºÆ¤Ó͸ú¤Ë¤Ê¤Ã¤¿¤È¤¤Ë¡¢»Ò¤â͸ú¤Ë¤Ê¤ë¡£
Enable or disable the window for user input. Note that when a parent window is
disabled, all of its children are disabled as well and they are reenabled again
when the parent is.
Parameters
enable
¥¦¥£¥ó¥É¥¦¤ÎÆþÎϤò͸ú¤Ë¤¹¤ë¤Ê¤é TRUE¡¢
̵¸ú¤Ë¤¹¤ë¤Ê¤é FALSE¡£
If TRUE, enables the window for input. If FALSE, disables the window.
Return value
¥¦¥£¥ó¥É¥¦¤¬Í¸ú¡¢¤Þ¤¿¤Ï̵¸ú¤Ë¤Ê¤Ã¤¿¤é¡¢TRUE¡¢
²¿¤â¤·¤Ê¤±¤ì¤Ð¡¢¤¹¤Ê¤ï¤Á¡¢´û¤Ë»ØÄꤷ¤¿¾õÂ֤ˤʤäƤ¤¤ì¤Ð¡¢FALSE¡£
Returns
TRUE if the window has been enabled or disabled,
FALSE if
nothing was done, i.e. if the window had already been in the specified state.
See also
wxWindow::IsEnabled,
wxWindow::Disable
wxWindow::FindFocus
static wxWindow* FindFocus()
¸½ºß¥¡¼¥Ü¡¼¥É¥Õ¥©¡¼¥«¥¹¤ò»ý¤Ã¤Æ¤¤¤ë¥¦¥£¥ó¥É¥¦¤ä¥³¥ó¥È¥í¡¼¥ë¤ò¸«¤Ä¤±¤ë¡£
Finds the window or control which currently has the keyboard focus.
Remarks
¥á¥â¡§¤³¤ì¤ÏÀÅŪ´Ø¿ô¤Ê¤Î¤Ç¡¢wxWindow ¤Î¥Ý¥¤¥ó¥¿¤¬¤Ê¤¯¤Æ¤â¸Æ¤Ö¤³¤È¤¬¤Ç¤¤ë¡£
Note that this is a static function, so it can be called without needing a wxWindow pointer.
See also
wxWindow::SetFocus
wxWindow::FindWindow
wxWindow* FindWindow(long id)
£É£Ä¤Ë¤è¤Ã¤Æ¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¤Î»Ò¤ò¸«¤Ä¤±¤ë¡£
Find a child of this window, by identifier.
wxWindow* FindWindow(const wxString& name)
̾Á°¤Ë¤è¤Ã¤Æ¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¤Î»Ò¤ò¸«¤Ä¤±¤ë¡£
Find a child of this window, by name.
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython ¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
FindWindowById(id)
|
À°¿ôÃͤò¼õ¤±¼è¤ë¡£
Accepts an integer
|
FindWindowByName(name)
|
ʸ»úÎó¤ò¼õ¤±¼è¤ë¡£
Accepts a string
|
wxWindow::FindWindowById
static wxWindow* FindWindowById(long id, wxWindow* parent = NULL)
Í¿¤¨¤é¤ì¤¿
id ¤ÇºÇ½é¤Î¥¦¥£¥ó¥É¥¦¤ò¸«¤Ä¤±¤ë¡£
parent ¤¬ NULL ¤Ê¤é¡¢¤¹¤Ù¤Æ¤Î¥È¥Ã¥×¥ì¥Ù¥ë¥Õ¥ì¡¼¥à¤È¡¢
¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¤«¤é¸¡º÷¤ò»Ï¤á¤ë¡£
NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢¸¡º÷¤ÏÍ¿¤¨¤é¤ì¤¿¥¦¥£¥ó¥É¥¦¤Î³¬ÁؤËÀ©¸Â¤µ¤ì¤ë¤À¤í¤¦¡£
Find the first window with the given
id.
If parent is NULL, the search will start from all top-level
frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
The search is recursive in both cases.
See also
FindWindow
wxWindow::FindWindowByName
static wxWindow* FindWindowByName(const wxString& name, wxWindow* parent = NULL)
¥³¥ó¥¹¥È¥é¥¯¥¿¤«¡¢
Create ´Ø¿ô¤Ë¤è¤Ã¤ÆÍ¿¤¨¤é¤ì¤¿Ì¾Á°¤Ç¥¦¥£¥ó¥É¥¦¤ò¸«¤Ä¤±¤ë¡£
parent ¤¬ NULL ¤Ê¤é¡¢¤¹¤Ù¤Æ¤Î¥È¥Ã¥×¥ì¥Ù¥ë¥Õ¥ì¡¼¥à¤È¡¢
¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¤«¤é¸¡º÷¤ò»Ï¤á¤ë¡£
NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢¸¡º÷¤ÏÍ¿¤¨¤é¤ì¤¿¥¦¥£¥ó¥É¥¦¤Î³¬ÁؤËÀ©¸Â¤µ¤ì¤ë¤À¤í¤¦¡£
¤½¤Î¤è¤¦¤Ê̾Á°¤Î¥¦¥£¥ó¥É¥¦¤¬¸«¤Ä¤«¤é¤Ê¤±¤ì¤Ð¡¢
FindWindowByLabel ¤¬¸Æ¤Ð¤ì¤ë¡£
Find a window by its name (as given in a window constructor or
Create function call).
If
parent is NULL, the search will start from all top-level
frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
The search is recursive in both cases.
If no window with such name is found,
FindWindowByLabel is called.
See also
FindWindow
wxWindow::FindWindowByLabel
static wxWindow* FindWindowByLabel(const wxString& label, wxWindow* parent = NULL)
¥é¥Ù¥ë¤Ë¤è¤Ã¤Æ¡¢¥¦¥£¥ó¥É¥¦¤ò¸«¤Ä¤±¤ë¡£
¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥×¤«¤éÆÈΩ¤·¤Æ¡¢¥é¥Ù¥ë¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë¤Ë¤Ê¤ë¤«¡¢
¥Ñ¥Í¥ë¥¢¥¤¥Æ¥à¤Î¥é¥Ù¥ë¤Ë¤Ê¤ë¤À¤í¤¦¡£
parent ¤¬ NULL ¤Ê¤é¡¢¤¹¤Ù¤Æ¤Î¥È¥Ã¥×¥ì¥Ù¥ë¥Õ¥ì¡¼¥à¤È¡¢
¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¤«¤é¸¡º÷¤ò»Ï¤á¤ë¡£
NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢¸¡º÷¤ÏÍ¿¤¨¤é¤ì¤¿¥¦¥£¥ó¥É¥¦¤Î³¬ÁؤËÀ©¸Â¤µ¤ì¤ë¤À¤í¤¦¡£
¸¡º÷¤ÏξÊý¤Î¥±¡¼¥¹¤Ë¤ª¤¤¤Æ¡¢ºÆµ¢Åª¤Ë¹Ô¤ï¤ì¤ë¡£
Find a window by its label. Depending on the type of window, the label may be a window title
or panel item label. If
parent is NULL, the search will start from all top-level
frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy.
The search is recursive in both cases.
See also
FindWindow
wxWindow::Fit
virtual void Fit()
¥µ¥Ö¥¦¥£¥ó¥É¥¦¤Î¼þ¤ê¤Ë¥Õ¥£¥Ã¥È¤¹¤ë¤è¤¦¤Ë¥µ¥¤¥º¤òÊѤ¨¤ë¡£
¤³¤Î´Ø¿ô¤Ï¡¢¥µ¥Ö¥¦¥£¥ó¥É¥¦¤¬¤Ê¤¤¾ì¹ç¤Ï²¿¤â¤·¤Ê¤¤¤À¤í¤¦¡£
This function won't do
anything if there are no subwindows.
wxWindow::FitInside
virtual void FitInside()
Fit ¤È»÷¤Æ¤¤¤ë¤¬¡¢
¤³¤Î´Ø¿ô¤Ï¥¦¥£¥ó¥É¥¦¤ÎÆâ¦¡Ê²¾ÁۤΡ˥µ¥¤¥º¤ËÂ礤µ¤ò¹ç¤ï¤»¤ë¡£
¼ç¤È¤·¤Æ¡¢¥µ¥¤¥º¥¤¥Ù¥ó¥È¤ò¥È¥ê¥¬¡¼¤·¤Ê¤¤¥µ¥¤¥ºÊѹ¹¤ä¡¢
Æâ¦¤Ë¥µ¥¤¥¶¡¼¤Î¤Ê¤¤¥¦¥£¥ó¥É¥¦¤ò¥¹¥¯¥í¡¼¥ë¤·¤¿¸å¤Ë¡¢
¥¹¥¯¥í¡¼¥ë¤µ¤ì¤¿¥¦¥£¥ó¥É¥¦¤Ç¡¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ò¥ê¥»¥Ã¥È¤¹¤ë¤Î¤ËÌò¤ËΩ¤Ä¡£
¥µ¥Ö¥¦¥£¥ó¥É¥¦¤¬¤Ê¤¤¤Ê¤é¡¢¤³¤Î´Ø¿ô¤Ï²¿¤â¤·¤Ê¤¤¤Î¤ÈƱ¤¸¤Ç¤¢¤ë¡£
Similar to
Fit, but sizes the interior (virtual) size
of a window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled windows without
an interior sizer. This function similarly won't do anything if there are no
subwindows.
wxWindow::Freeze
virtual void Freeze()
¥¦¥£¥ó¥É¥¦¤ò¥Õ¥ê¡¼¥º¤µ¤»¤ë¡£¸À¤¤´¹¤¨¤ì¤Ð¡¢¥¹¥¯¥ê¡¼¥ó¾å¤Çµ¯¤³¤ëÁ´¤Æ¤Î¹¹¿·¤ò˸¤²¡¢
¥¦¥£¥ó¥É¥¦¤ÏÁ´¤¯ÉÁ¤Ä¾¤µ¤ì¤Ê¤¤¡£
¥¦¥£¥ó¥É¥¦¤ÎºÆÉÁ²è¤òºÆ¤Ó͸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢
Thaw ¤¬¸Æ¤Ð¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢¥Ó¥¸¥å¥¢¥ë¤Ê³µ´Ñ¤ÎºÇŬ²½¤ËÌòΩ¤Ä¡£
¡ÊÎ㤨¤Ð¡¢wxGTK²¼¤Ç¡¢wxTextCtrl ¤ËÂçÎ̤Υƥ¥¹¥È¤òÁÞÆþ¤¹¤ëÁ°¤Ë¡¢¤³¤ì¤ò»È¤¦¤Î¤Ï¤è¤¤¥¢¥¤¥Ç¥£¥¢¤À¡Ë
¤·¤«¤·¡¢Á´¤Æ¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤ä¥³¥ó¥È¥í¡¼¥ë¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢
¤¿¤¤¤Æ¤¤¤Ï¡¢wxWidgets ¤Ø¤Î¥Ò¥ó¥È¤Ç¤¢¤ê¡¢¶¯À©Åª¤ÊÌ¿Îá¤Ç¤Ï¤Ê¤¤¡£
Freezes the window or, in other words, prevents any updates from taking place
on screen, the window is not redrawn at all.
Thaw must
be called to reenable window redrawing.
This method is useful for visual appearance optimization (for example, it
is a good idea to use it before inserting large amount of text into a
wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all
controls so it is mostly just a hint to wxWidgets and not a mandatory
directive.
wxWindow::GetAdjustedBestSize
wxSize GetAdjustedBestSize() const
¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢£±¤Ä¤À¤±½ü¤¤¤Æ
GetBestSize ¤È»÷¤Æ¤¤¤ë¡£
GetBestSize ¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤òÀÚ¤êµÍ¤á¤Ê¤¤¡¢ºÇ¾®¥µ¥¤¥º¤òÊÖ¤¹¤Ù¤¤Ç¤¢¤ë¡£
°ìÊý¡¢¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢BestSize ¤Ç¥æ¡¼¥¶¤¬»ØÄꤷ¤¿ºÇ¾®¥µ¥¤¥º¤Î¡¢ºÇ¤âÂ礤¤¤â¤Î¤òÊÖ¤¹¡£
¤¹¤Ê¤ï¤Á¡¢¤½¤ì¤ÏÂçÌܤ˸«¤ë¤³¤È¤Î¤Ç¤¤ëºÇ¾®¥µ¥¤¥º¤Ç¤Ï¤Ê¤¯¡¢
¤½¤Î¥¦¥£¥ó¥É¥¦¤¬¡¢¸½ºß°ú¤«¤ì¤ë¤Ù¤ºÇ¾®¥µ¥¤¥º¤Ç¤¢¤ë¡£
This method is similar to
GetBestSize, except
in one thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any user
specified minimum size. ie. it is the minimum size the window should currently
be drawn at, not the minimal size it can possibly tolerate.
wxWindow::GetBackgroundColour
virtual wxColour GetBackgroundColour() const
¥¦¥£¥ó¥É¥¦¤ÎÇØ·Ê¿§¤òÊÖ¤¹¡£
Returns the background colour of the window.
See also
wxWindow::SetBackgroundColour,
wxWindow::SetForegroundColour,
wxWindow::GetForegroundColour
wxWindow::GetBestSize
virtual wxSize GetBestSize() const
¤³¤Î´Ø¿ô¤Ï¡¢¥¦¥£¥ó¥É¥¦¤ÎºÇ¤âÎɤ¯¼õ¤±Æþ¤ì¤é¤ì¤ëºÇ¾®¥µ¥¤¥º¤òÊÖ¤¹¡£
Î㤨¤Ð¡¢static control ¤Ç¡¢¥³¥ó¥È¥í¡¼¥ë¤Î¥é¥Ù¥ë¤¬¡¢ÀÚ¤êµÍ¤á¤é¤ì¤Ê¤¤¤Î¤¬ºÇ¾®¥µ¥¤¥º¤È¤Ê¤ë¡£
¥µ¥Ö¥¦¥£¥ó¥É¥¦¤ò´Þ¤à¥¦¥£¥ó¥É¥¦¡Êŵ·¿Åª¤Ê¤â¤Î¤¬
wxPanel¡Ë¤Ç¡¢
¤³¤Î´Ø¿ô¤¬ÊÖ¤¹¥µ¥¤¥º¤Ï¡¢
Fit ¤ò¸Æ¤ó¤À¸å¤Ë¡¢
¥¦¥£¥ó¥É¥¦¤¬»ý¤Ä¥µ¥¤¥º¤ÈƱ¤¸¤Ë¤Ê¤ë¡£
This functions returns the best acceptable minimal size for the window. For
example, for a static control, it will be the minimal size such that the
control label is not truncated. For windows containing subwindows (typically
wxPanel), the size returned by this function will be the
same as the size the window would have had after calling
Fit.
wxWindow::GetCaret
wxCaret * GetCaret() const
¥¦¥£¥ó¥É¥¦¤Ë·ë¤ÓÉÕ¤±¤é¤ì¤¿
caret ¤òÊÖ¤¹¡£
Returns the
caret associated with the window.
wxWindow::GetCapture
static wxWindow * GetCapture()
¸½ºß¤Î¥¥ã¥×¥Á¥ã¤µ¤ì¤Æ¤¤¤ë¥¦¥£¥ó¥É¥¦¤òÊÖ¤¹¡£
Returns the currently captured window.
See also
wxWindow::HasCapture,
wxWindow::CaptureMouse,
wxWindow::ReleaseMouse,
wxMouseCaptureChangedEvent
wxWindow::GetCharHeight
virtual int GetCharHeight() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤Îʸ»ú¤Î¹â¤µ¤òÊÖ¤¹¡£
Returns the character height for this window.
wxWindow::GetCharWidth
virtual int GetCharWidth() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤Îʸ»úÉý¤ÎÊ¿¶Ñ¤òÊÖ¤¹¡£
Returns the average character width for this window.
wxWindow::GetChildren
wxList& GetChildren()
¥¦¥£¥ó¥É¥¦¤Î¤³¤Î¥ê¥¹¥È¤Ø¤Î»²¾È¤òÊÖ¤¹¡£
Returns a reference to the list of the window's children.
wxWindow::GetClientSize
virtual void GetClientSize(int* width, int* height) const
wxPerl note:
wxPerl ¤Ç¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤Ï°ú¿ô¤¬¤Ê¤¯¡¢
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥ê¥¹¥È( width, height )¤òÊÖ¤¹¡£
wxPerl note: In wxPerl this method takes no parameter and returns
a 2-element list
( width, height ).
virtual wxSize GetClientSize() const
¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î¡Ö¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¡×¤Î¥µ¥¤¥º¤òÆÀ¤ë¡£
¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¤Ï¡¢¥¿¥¤¥È¥ë¥Ð¡¼¡¢¥Ü¡¼¥À¡¼¡¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ê¤É¤ò¤Î¤¾¤¤¤¿¡¢
¥×¥í¥°¥é¥Þ¤Ë¤è¤Ã¤ÆÉÁ²è¤µ¤ì¤ëÎΰè¤Ç¤¢¤ë¡£
This gets the size of the window 'client area' in pixels.
The client area is the area which may be drawn on by the programmer,
excluding title bar, border, scrollbars, etc.
Parameters
width
height
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
GetClientSizeTuple()
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥¿¥×¥ë(width, height)¤òÊÖ¤¹¡£
Returns a 2-tuple of (width, height)
|
GetClientSize()
|
wxSize ¥ª¥Ö¥¸¥§¥¯¥È¤òÊÖ¤¹¡£
Returns a wxSize object
|
See also
GetSize
GetVirtualSize
wxWindow::GetConstraints
wxLayoutConstraints* GetConstraints() const
¥¦¥£¥ó¥É¥¦¤Î layout constraints ¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
¤Ê¤±¤ì¤Ð¡¢NULL¡£
Returns a pointer to the window's layout constraints, or NULL if there are none.
wxWindow::GetContainingSizer
const wxSizer * GetContainingSizer() const
¤â¤·¤¢¤ì¤Ð¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¤¬¥á¥ó¥Ð¡¼¤Ç¤¢¤ë sizer ¤òÊÖ¤¹¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢NULL¡£
Return the sizer that this window is a member of, if any, otherwise
NULL.
wxWindow::GetDropTarget
wxDropTarget* GetDropTarget() const
·ë¤ÓÉÕ¤±¤é¤ì¤Æ¤¤¤ë¥É¥í¥Ã¥×¥¿¡¼¥²¥Ã¥È¤òÊÖ¤¹¡£NULL ¤«¤â¤·¤ì¤Ê¤¤¡£
Returns the associated drop target, which may be NULL.
See also
wxWindow::SetDropTarget,
Drag and drop overview
wxWindow::GetEventHandler
wxEvtHandler* GetEventHandler() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤òÊÖ¤¹¡£
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤½¤Î¥¦¥£¥ó¥É¥¦¤¬¡¢¤½¤ì¼«¿È¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ç¤¢¤ë¡£
Returns the event handler for this window. By default, the window is its
own event handler.
See also
wxWindow::SetEventHandler,
wxWindow::PushEventHandler,
wxWindow::PopEventHandler,
wxEvtHandler::ProcessEvent,
wxEvtHandler
wxWindow::GetExtraStyle
long GetExtraStyle() const
¥¦¥£¥ó¥É¥¦¤Î³ÈÄ¥¥¹¥¿¥¤¥ë¤òÊÖ¤¹¡£
Returns the extra style bits for the window.
wxWindow::GetFont
wxFont& GetFont() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤Î¥Õ¥©¥ó¥È¤Ø¤Î»²¾È¤òÊÖ¤¹¡£
Returns a reference to the font for this window.
See also
wxWindow::SetFont
wxWindow::GetForegroundColour
virtual wxColour GetForegroundColour()
¥¦¥£¥ó¥É¥¦¤ÎÁ°·Ê¿§¤òÊÖ¤¹¡£
Returns the foreground colour of the window.
Remarks
Á°·Ê¿§¤Î²ò¼á¤Ï¡¢¥¦¥£¥ó¥É¥¦¥¯¥é¥¹¤Ë¤è¤Ã¤Æ²ò¼á¤µ¤ì¤ë¡£
¥Æ¥¥¹¥È¤Î¿§¤ä¡¢¤½¤Î¾¤Î¿§¤Ë¤Ê¤Ã¤Æ¤âÎɤ¤¤·¡¢Á´¤¯»È¤ï¤ì¤Ê¤¯¤Æ¤âÎɤ¤¡£
The interpretation of foreground colour is open to interpretation according
to the window class; it may be the text colour or other colour, or it may not
be used at all.
See also
wxWindow::SetForegroundColour,
wxWindow::SetBackgroundColour,
wxWindow::GetBackgroundColour
wxWindow::GetGrandParent
wxWindow* GetGrandParent() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤Î grandparent ¤òÊÖ¤¹¡£
¤Ê¤±¤ì¤Ð¡¢NULL¡£
Returns the grandparent of a window, or NULL if there isn't one.
wxWindow::GetHandle
void* GetHandle() const
ʪÍýŪ¤Ê¥¦¥£¥ó¥É¥¦¤Î¡¢¥×¥é¥Ã¥È¥Õ¥©¡¼¥à°Í¸¤Ê¥Ï¥ó¥É¥ë¤òÊÖ¤¹¡£
Windows ¤Ç¤Ï HWND¡¢Motif ¤Ç¤Ï Widget¡¢GTK ¤Ç¤Ï GtkWidget ¤Î¤è¤¦¤Ë¡¢
ŬÀڤʥϥó¥É¥ë¤Ë¥¥ã¥¹¥È¤·¤Æ¤¯¤ì¡£
Returns the platform-specific handle of the physical window. Cast it to an appropriate
handle, such as
HWND for Windows,
Widget for Motif or
GtkWidget for GTK.
wxPython note:
wxPython ¤Ç¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢À°¿ôÃͤòÊÖ¤¹¡£
wxPython note: This method will return an integer in wxPython.
wxPerl note:
wxPerl ¤Ç¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢À°¿ôÃͤòÊÖ¤¹¡£
wxPerl note: This method will return an integer in wxPerl.
wxWindow::GetHelpText
virtual wxString GetHelpText() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤Ç¡¢context-sensitive¥Ø¥ë¥×¤È¤·¤Æ»È¤ï¤ì¤ë¥Æ¥¥¹¥È¤òÆÀ¤ë¡£
¥á¥â¡§¸½ºß¤Î wxHelpProvider ¤Î¼ÂÁõ¤Ë¤è¤Ã¤Æ¡¢
¼ÂºÝ¤Ë¥Æ¥¥¹¥È¤¬¥¹¥È¥¢¤µ¤ì¤ë¤Î¤Ç¡¢¥¦¥£¥ó¥É¥¦¥ª¥Ö¥¸¥§¥¯¥È¼«¿È¤ÎÃæ¤Ç¤Ï¤Ê¤¤¡£
Gets the help text to be used as context-sensitive help for this window.
Note that the text is actually stored by the current wxHelpProvider implementation,
and not in the window object itself.
See also
SetHelpText, wxHelpProvider
wxWindow::GetId
int GetId() const
¥¦¥£¥ó¥É¥¦¤Î£É£Ä¤òÊÖ¤¹¡£
Returns the identifier of the window.
Remarks
¤¤¤º¤ì¤Î¥¦¥£¥ó¥É¥¦¤â¡¢À°¿ô¤Î£É£Ä¤ò»ý¤Ä¡£
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬£É£Ä¤òÍ¿¤¨¤é¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð(¤â¤·¤¯¤Ï¥Ç¥Õ¥©¥ë¥È¤Î£É£Ä¤Ç¤¢¤ë -1 )¤Ê¤é¡¢
Éé¤ÎÃͤò»ý¤Ä¡¢Í£°ì¤Î£É£Ä¤¬À¸À®¤µ¤ì¤ë¤À¤í¤¦¡£
Each window has an integer identifier. If the application has not provided one
(or the default Id -1) an unique identifier with a negative value will be generated.
See also
wxWindow::SetId,
Window identifiers
wxWindow::GetLabel
virtual wxString GetLabel() const
Ʊ°ì¤Î¤â¤Î¤À¤È¾ÚÌÀ¤¹¤ë¤¿¤á¤Î¡¢¥¦¥£¥ó¥É¥¦¤«¤é¥é¥Ù¥ë¤òÆÀ¤ë°ìÈÌŪ¤ÊÊýË¡¡£
Generic way of getting a label from any window, for
identification purposes.
Remarks
¤³¤Î´Ø¿ô¤Î²ò¼á¤Ï¡¢¥¯¥é¥¹¤Ë¤è¤Ã¤Æ°ã¤¦¡£
¥Õ¥ì¡¼¥à¤È¥À¥¤¥¢¥í¥°¤Ç¤Ï¡¢ÊÖ¤µ¤ì¤ëÃͤϡ¢¥¿¥¤¥È¥ë¤Ç¤¢¤ë¡£
¥Ü¥¿¥ó¤ä¡¢static text controls ¤Ç¤Ï¡¢¥Ü¥¿¥ó¥Æ¥¥¹¥È¤Ç¤¢¤ë¡£
¤³¤Î´Ø¿ô¤Ï¡¢Ì¾Á°¤Ë¤è¤Ã¤Æ¡¢¥¦¥£¥ó¥É¥¦¤ò¼±Ê̤¹¤ëɬÍפΤ¢¤ë
meta-programs¡Ê¥Ä¡¼¥ë¤Î¥Æ¥¹¥È¤ä¡¢ÆÃÊ̤ʥ¢¥¯¥»¥¹¤òɬÍפȤ¹¤ë¥×¥í¥°¥é¥à¡Ë¤Ç
ÊØÍø¤Ç¤¢¤ë¡£
The interpretation of this function differs from class to class.
For frames and dialogs, the value returned is the title. For buttons or static text controls, it is
the button text. This function can be useful for meta-programs (such as testing
tools or special-needs access programs) which need to identify windows
by name.
wxWindow::GetName
virtual wxString GetName() const
¥¦¥£¥ó¥É¥¦¤Î̾Á°¤òÊÖ¤¹¡£
Returns the window's name.
Remarks
¤³¤Î̾Á°¤ÏÍ£°ì¤Ç¤¢¤ë¤³¤È¤òÊݾڤ¹¤ë¤â¤Î¤Ç¤Ï¤Ê¤¤¡£
¥¦¥£¥ó¥É¥¦¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¤Ç¡¢¤â¤·¤¯¤Ï
wxWindow::SetName
¤Ë¤è¤Ã¤ÆÅ¬ÀÚ¤Ê̾Á°¤òÍ¿¤¨¤ë¤³¤È¤Ï¡¢¥×¥í¥°¥é¥Þ¼¡Âè¤Ç¤¢¤ë¡£
This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate
name in the window constructor or via
wxWindow::SetName.
See also
wxWindow::SetName
wxWindow::GetParent
virtual wxWindow* GetParent() const
¥¦¥£¥ó¥É¥¦¤Î¿Æ¤òÊÖ¤¹¡£
¿Æ¤¬¤Ê¤¤¤Ê¤é¡¢NULL¡£
Returns the parent of the window, or NULL if there is no parent.
wxWindow::GetPosition
virtual void GetPosition(int* x, int* y) const
wxPoint GetPosition() const
¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î°ÌÃÖ¤òÆÀ¤ë¡£
»Ò¥¦¥£¥ó¥É¥¦¤Ï¡¢¿Æ¥¦¥£¥ó¥É¥¦¤«¤é¤ÎÁêÂаÌÃ֤ǡ¢
¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤Ï¡¢¥Ç¥£¥¹¥×¥ì¥¤¤Î»Ï¤Þ¤ê¤Î°ÌÃÖ¤«¤é¤Ç¤¢¤ë¡£
This gets the position of the window in pixels, relative to the parent window
for the child windows or relative to the display origin for the top level
windows.
Parameters
x
y
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
GetPosition()
|
wxPoint ¤òÊÖ¤¹¡£
Returns a wxPoint
|
GetPositionTuple()
|
¥¿¥×¥ë(x, y)¤òÊÖ¤¹¡£
Returns a tuple (x, y)
|
wxPerl note:
wxPerl ¤Ç¤Ï¡¢¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É¤ÎÂå¤ï¤ê¤Ë¡¢
£²¤Ä¤Î¥á¥½¥Ã¥É¤¬Â¸ºß¤¹¤ë¡£
wxPerl note: In wxPerl there are two methods instead of a single overloaded
method:
GetPosition()
|
Wx::Point ¤òÊÖ¤¹¡£
Returns a Wx::Point
|
GetPositionXY()
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥ê¥¹¥È( x, y )¤òÊÖ¤¹¡£
Returns a 2-element list
( x, y )
|
wxWindow::GetRect
virtual wxRect GetRect() const
¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤È°ÌÃÖ¤ò
wxRect ¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆÊÖ¤¹¡£
Returns the size and position of the window as a
wxRect object.
wxWindow::GetScrollThumb
virtual int GetScrollThumb(int orientation)
Æâ¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¡¢ thumb ¤Î¥µ¥¤¥º¤òÊÖ¤¹¡£
Returns the built-in scrollbar thumb size.
See also
wxWindow::SetScrollbar
wxWindow::GetScrollPos
virtual int GetScrollPos(int orientation)
Æâ¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¡¢ °ÌÃÖ¤òÊÖ¤¹¡£
Returns the built-in scrollbar position.
See also
See wxWindow::SetScrollbar
wxWindow::GetScrollRange
virtual int GetScrollRange(int orientation)
Æâ¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¡¢ ÈϰϤòÊÖ¤¹¡£
Returns the built-in scrollbar range.
See also
wxWindow::SetScrollbar
wxWindow::GetSize
virtual void GetSize(int* width, int* height) const
virtual wxSize GetSize() const
¤³¤ì¤Ï¡¢¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¥¿¥¤¥È¥ë¥Ð¡¼¡¢¥Ü¡¼¥À¡¼¡¢¥¹¥¯¥í¡¼¥ë¥Ð¡Ý¤Ê¤É¤ò
´Þ¤à´°Á´¤Ê¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤òÆÀ¤ë¡£
This gets the size of the entire window in pixels,
including title bar, border, scrollbars, etc.
Parameters
width
height
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
GetSize()
|
wxSize ¤òÊÖ¤¹¡£
Returns a wxSize
|
GetSizeTuple()
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥¿¥×¥ë(width, height)¤òÊÖ¤¹¡£
Returns a 2-tuple (width, height)
|
wxPerl note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É¤ÎÂå¤ï¤ê¤Ë¡¢wxPerl¤Ç¤Ï¡¢£²¤Ä¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPerl note: In wxPerl there are two methods instead of a single overloaded
method:
GetSize()
|
Wx::Size ¤òÊÖ¤¹¡£
Returns a Wx::Size
|
GetSizeWH()
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥ê¥¹¥È( width, height )¤òÊÖ¤¹¡£
Returns a 2-element list
( width, height )
|
See also
GetClientSize,
GetVirtualSize
wxWindow::GetSizer
wxSizer * GetSizer() const
°ÊÁ°¤Î
SetSizer() ¤Ø¤Î¸Æ¤Ó½Ð¤·¤«¡¢
NULL
¤Ë¤è¤Ã¤Æ¡¢¥¦¥£¥ó¥É¥¦¤Ë·ë¤ÓÉÕ¤±¤é¤ì¤¿sizer¤òÊÖ¤¹¡£
Return the sizer associated with the window by a previous call to
SetSizer() or
NULL.
wxWindow::GetTextExtent
virtual void GetTextExtent(const wxString& string, int* x, int* y,
int* descent = NULL, int* externalLeading = NULL,
const wxFont* font = NULL, bool use16 = FALSE) const
¸½ºßÁªÂò¤µ¤ì¤Æ¤¤¤ë¥Õ¥©¥ó¥È¤ò»È¤Ã¤Æ¡¢¥¦¥£¥ó¥É¥¦¤ËÉÁ²è¤µ¤ì¤¿¤â¤Î¤È¤·¤Æ¡¢
ʸ»úÎó¤ÎÂ礤µ¤òÆÀ¤ë¡£
Gets the dimensions of the string as it would be drawn on the
window with the currently selected font.
Parameters
string
x
Éý¤ÎÌá¤êÃÍ¡£
Return value for width.
y
¹â¤µ¤ÎÌá¤êÃÍ¡£
Return value for height.
descent
externalLeading
font
use16
TRUE ¤Ê¤é¡¢string ¤Ï16¥Ó¥Ã¥Èʸ»ú¤ò´Þ¤à¡£
¥Ç¥Õ¥©¥ë¥È¤Ï FALSE¡£
If TRUE, string contains 16-bit characters. The default is FALSE.
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
GetTextExtent(string)
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥¿¥×¥ë(width, height)¤òÊÖ¤¹¡£
Returns a 2-tuple, (width, height)
|
GetFullTextExtent(string, font=NULL)
|
£´¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥¿¥×¥ë(width, height, descent, externalLeading)¤òÊÖ¤¹¡£
Returns a
4-tuple, (width, height, descent, externalLeading)
|
wxPerl note:
wxPerl ¤Ç¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢string ¤È¥ª¥×¥·¥ç¥ó¤Î font °ú¿ô¤À¤±¤ò¤È¤ê¡¢
£´¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥ê¥¹¥È( x, y, descent, externalLeading )¤òÊÖ¤¹¡£
wxPerl note: In wxPerl this method takes only the
string and optionally
font parameters, and returns a 4-element list
( x, y, descent, externalLeading ).
wxWindow::GetTitle
virtual wxString GetTitle()
¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë¤òÆÀ¤ë¡£
¥Õ¥ì¡¼¥à¤È¥À¥¤¥¢¥í¥°¤À¤±¤ËŬÍѤǤ¤ë¡£
Gets the window's title. Applicable only to frames and dialogs.
See also
wxWindow::SetTitle
wxWindow::GetUpdateRegion
virtual wxRegion GetUpdateRegion() const
¥¦¥£¥ó¥É¥¦¤ÎÈï³²¤ò¼õ¤±¤¿Éôʬ¤ÎÎΰè¤òÊÖ¤¹¡£
wxPaintEvent ¥Ï¥ó¥É¥éÆâ¤Ç¤Î¤ß¸Æ¤Ð¤ì¤ë¤Ù¤¤Ç¤¢¤ë¡£
Returns the region specifying which parts of the window have been damaged. Should
only be called within an
wxPaintEvent handler.
See also
wxRegion,
wxRegionIterator
wxWindow::GetValidator
wxValidator* GetValidator() const
¥¦¥£¥ó¥É¥¦¤Î¸½ºß¤Î¥Ð¥ê¥Ç¡¼¥¿¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
¤Ê¤±¤ì¤Ð¡¢NULL¡£
Returns a pointer to the current validator for the window, or NULL if there is none.
wxWindow::GetVirtualSize
void GetVirtualSize(int* width, int* height) const
wxSize GetVirtualSize() const
¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î²¾ÁÛ¥µ¥¤¥º¤òÆÀ¤ë¡£
This gets the virtual size of the window in pixels.
Parameters
width
height
GetSize,
GetClientSize
wxWindow::GetWindowStyleFlag
long GetWindowStyleFlag() const
¥³¥ó¥¹¥È¥é¥¯¥¿¤«¡¢Create ¥á¥½¥Ã¥É¤Ë¤è¤Ã¤Æ¡¢»ØÄꤵ¤ì¤¿¥¹¥¿¥¤¥ë¤òÆÀ¤ë¡£
GetWindowStyle() ¤Ï¡¢Æ±¤¸µ¡Ç½¤ÎÊÌ̾¤Ç¤¢¤ë¡£
Gets the window style that was passed to the constructor or
Create
method.
GetWindowStyle() is another name for the same function.
wxWindow::HasCapture
virtual bool HasCapture() const
¤³¤Î¥¦¥£¥ó¥É¥¦¤¬¸½ºß¤Î¥Þ¥¦¥¹¥¥ã¥×¥Á¥ã¤ò»ý¤Ã¤Æ¤¤¤ì¤Ð TRUE
Returns TRUE if this window has the current mouse capture.
See also
wxWindow::CaptureMouse,
wxWindow::ReleaseMouse,
wxMouseCaptureChangedEvent
wxWindow::Hide
bool Hide()
Show(
FALSE) ¤ò¸Æ¤Ö¤³¤È¤ËÅù¤·¤¤¡£
Equivalent to calling
Show(
FALSE).
wxWindow::InitDialog
void InitDialog()
wxEVT_INIT_DIALOG ¥¤¥Ù¥ó¥È¤òÁ÷¤ë¡£
¤½¤Î¥Ï¥ó¥É¥é¤Ï¤¿¤¤¤Æ¤¤¡¢¥Ð¥ê¥Ç¡¼¥¿¤òÄ̤·¤Æ¥À¥¤¥¢¥í¥°¤Ë¥Ç¡¼¥¿¤òÁ÷¤ë¡£
Sends an
wxEVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
wxWindow::IsEnabled
virtual bool IsEnabled() const
¥¦¥£¥ó¥É¥¦¤ÎÆþÎϤ¬Í¸ú¤Ê¤é TRUE¡¢
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð FALSE ¤òÊÖ¤¹¡£
Returns
TRUE if the window is enabled for input,
FALSE otherwise.
See also
wxWindow::Enable
wxWindow:IsExposed
bool IsExposed(int x, int y) const
bool IsExposed(wxPoint &pt) const
bool IsExposed(int x, int y, int w, int h) const
bool IsExposed(wxRect &rect) const
Í¿¤¨¤é¤ì¤¿°ÌÃÖ¤«¡¢¶ë·ÁÎΰ褬¡¢ºÇ¸å¤ÎºÆÉÁ²è°ÊÍ褺¤Ã¤Èɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤Ê¤é¡¢TRUE ¤òÊÖ¤¹¡£
ɽ¼¨¤µ¤ì¤Æ¤¤¤ëÎΰè¤À¤±¤òºÆÉÁ²è¤¹¤ë¤³¤È¤Ç¡¢
ºÆÉÁ²è¤òºÇŬ²½¤¹¤ë¤¿¤á¤Ë¡¢¥Ú¥¤¥ó¥È¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ç¤³¤ì¤ò¸Æ¤Ó¤Ê¤µ¤¤¡£
Returns
TRUE if the given point or rectangle area has been exposed since the
last repaint. Call this in an paint event handler to optimize redrawing by
only redrawing those areas, which have been exposed.
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
IsExposed(x,y, w=0,h=0
|
|
IsExposedPoint(pt)
|
|
IsExposedRect(rect)
|
|
wxWindow::IsRetained
virtual bool IsRetained() const
¥¦¥£¥ó¥É¥¦¤¬ÊÝ»ý¤µ¤ì¤Æ¤¤¤ë¤Ê¤é TRUE¡¢
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð FALSE ¤òÊÖ¤¹¡£
Returns
TRUE if the window is retained,
FALSE otherwise.
Remarks
ÊÝ»ý¤µ¤ì¤¿¥¦¥£¥ó¥É¥¦¤Ï X ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤Î¤ßÍøÍѤǤ¤ë¡£
Retained windows are only available on X platforms.
wxWindow::IsShown
virtual bool IsShown() const
¥¦¥£¥ó¥É¥¦¤¬É½¼¨¤µ¤ì¤¿¤Ê¤é TRUE ¤ò¡¢
±£¤µ¤ì¤Æ¤¤¤ë¤Ê¤é FALSE ¤òÊÖ¤¹¡£
Returns
TRUE if the window is shown,
FALSE if it has been hidden.
wxWindow::IsTopLevel
bool IsTopLevel() const
¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤Ê¤é¡¢TRUE ¤òÊÖ¤¹¡£
¸½ºß¤Ï¡¢¤¹¤Ù¤Æ¤Î¥Õ¥ì¡¼¥à¤È¥À¥¤¥¢¥í¥°¤¬¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤Ç¤¢¤ë¤«¤òȽÃǤµ¤ì¤ë¡£
¡Ê¤¿¤È¤¨¡¢¿Æ¥¦¥£¥ó¥É¥¦¤ò»ý¤Ã¤Æ¤¤¤¿¤È¤·¤Æ¤â¡Ë
Returns
TRUE if the given window is a top-level one. Currently all frames and
dialogs are considered to be top-level windows (even if they have a parent
window).
wxWindow::Layout
void Layout()
¤³¤Î¥¦¥£¥ó¥É¥¦¤Îconstraint¤«sizer¥Ù¡¼¥¹¤Î¥ì¥¤¥¢¥¦¥È¥¢¥ë¥´¥ê¥º¥à¤ò¸Æ¤Ó½Ð¤¹¡£
wxWindow::SetAutoLayout ¤ò¸«¤Æ¤¯¤ì¡§
¥ª¡¼¥È¥ì¥¤¥¢¥¦¥È¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¤³¤Î´Ø¿ô¤Ï¥¦¥£¥ó¥É¥¦¤¬¥ê¥µ¥¤¥º¤µ¤ì¤¿¤È¤¤Ë¡¢
¼«Æ°Åª¤Ë¸Æ¤Ð¤ì¤ë¡£
Invokes the constraint-based layout algorithm or the sizer-based algorithm
for this window.
See wxWindow::SetAutoLayout: when auto
layout is on, this function gets called automatically when the window is resized.
wxWindow::LoadFromResource
virtual bool LoadFromResource(wxWindow* parent,
const wxString& resourceName, const wxResourceTable* resourceTable = NULL)
¥ê¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤«¤é¥Ñ¥Í¥ë¤ä¥À¥¤¥¢¥í¥°¤ò¥í¡¼¥É¤¹¤ë¡£
Loads a panel or dialog from a resource file.
Parameters
parent
¿Æ¥¦¥£¥ó¥É¥¦¡£
Parent window.
resourceName
resourceTable
¥í¡¼¥É¤¹¤ë¤¿¤á¤Î¥ê¥½¡¼¥¹¥Æ¡¼¥Ö¥ë¡£
NULL ¤Ê¤é¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥ê¥½¡¼¥¹¥Æ¡¼¥Ö¥ë¤¬»È¤ï¤ì¤ë¡£
The resource table to load it from. If this is NULL, the
default resource table will be used.
Return value
À®¸ù¤¹¤ì¤Ð¡¢TRUE¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢FALSE¡£
TRUE if the operation succeeded, otherwise
FALSE.
wxWindow::Lower
void Lower()
´ÉÍý¤µ¤ì¤¿¥¦¥£¥ó¥É¥¦¡Ê¥À¥¤¥¢¥í¥°¤«¥Õ¥ì¡¼¥à¡Ë¤Ê¤é¡¢¥¦¥£¥ó¥É¥¦³¬ÁؤÎÄì¤Ë²¼¤²¤ë¡£
Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog
or frame).
wxWindow::MakeModal
virtual void MakeModal(bool flag)
¥æ¡¼¥¶¤ÎÁàºî¤¬¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤À¤±±Æ¶Á¤¹¤ë¤è¤¦¤Ë¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥óÆâ¤Ë¤¢¤ë¡¢Â¾¤Î¤¹¤Ù¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò̵¸ú¤Ë¤¹¤ë¡£
¡Ê¤³¤Î´Ø¿ô¤Ï¡¢¤É¤³¤Ç¤â¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡Ë
Disables all other windows in the application so that
the user can only interact with this window. (This function
is not implemented anywhere).
Parameters
flag
TRUE ¤Ê¤é¡¢¤³¤Î¸Æ¤Ó½Ð¤·¤Ï¡¢¥æ¡¼¥¶¤ÎÁàºî¤¬¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤À¤±±Æ¶Á¤¹¤ë¤è¤¦¤Ë¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥óÆâ¤Ë¤¢¤ë¡¢Â¾¤Î¤¹¤Ù¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò̵¸ú¤Ë¤¹¤ë¡£
FALSE ¤Ê¤é¡¢µÕ¤Î¸ú²Ì¤¬¤¢¤ë¡£.
If TRUE, this call disables all other windows in the application so that
the user can only interact with this window. If FALSE, the effect is reversed.
wxWindow::Move
void Move(int x, int y)
void Move(const wxPoint& pt)
Í¿¤¨¤é¤ì¤¿°ÌÃ֤ء¢¥¦¥£¥ó¥É¥¦¤ò°Üư¤¹¤ë¡£
Moves the window to the given position.
Parameters
x
£Ø¤Î°ÌÃÖ¡£
Required x position.
y
£Ù¤Î°ÌÃÖ¡£
Required y position.
pt
Remarks
SetSize ¤Î¼ÂÁõ¤Ï¡¢°ÅÌÛŪ¤Ë wxWindow::Move ´Ø¿ô¤ò¼ÂÁõ¤¹¤ë¤³¤È¤â¤Ç¤¤ë¡£
¥Ù¡¼¥¹¤Î wxWindow ¥¯¥é¥¹¤Ç¤Ï¡¢¼¡¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
Implementations of SetSize can also implicitly implement the
wxWindow::Move function, which is defined in the base wxWindow class
as the call:
SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING);
See also
wxWindow::SetSize
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
Move(point)
|
wxPoint ¤ò¼õ¤±¼è¤ë¡£
Accepts a wxPoint
|
MoveXY(x, y)
|
À°¿ôÃͤΥڥ¢¤ò¼õ¤±¼è¤ë¡£
Accepts a pair of integers
|
wxWindow::PopEventHandler
wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE) const
¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¥¹¥¿¥Ã¥¯¤ÎºÇ¾åÃʤΤâ¤Î¤ò¡¢¼è¤ê½ü¤¡¢¥ê¥¿¡¼¥ó¤¹¤ë¡£
Removes and returns the top-most event handler on the event handler stack.
Parameters
deleteHandler
TRUE ¤Ê¤é¡¢¥Ï¥ó¥É¥é¤Ï¡¢¼è¤ê½ü¤«¤ì¤¿¸å¤Ë¥Ç¥ê¡¼¥È¤µ¤ì¤ë¡£
¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï FALSE¡£
If this is TRUE, the handler will be deleted after it is removed. The
default value is FALSE.
See also
wxWindow::SetEventHandler,
wxWindow::GetEventHandler,
wxWindow::PushEventHandler,
wxEvtHandler::ProcessEvent,
wxEvtHandler
wxWindow::PopupMenu
bool PopupMenu(wxMenu* menu, const wxPoint& pos)
bool PopupMenu(wxMenu* menu, int x, int y)
Í¿¤¨¤é¤ì¤¿¥á¥Ë¥å¡¼¤ò¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¤ÎÁêÂаÌÃ֤ǻØÄꤵ¤ì¤¿ºÂɸ¤Ë¥Ý¥Ã¥×¥¢¥Ã¥×¤·¡¢
¥æ¡¼¥¶¤¬¥á¥Ë¥å¡¼¤òÂàµî¤µ¤»¤¿¤È¤¤Ë¡¢À©¸æ¤òÌ᤹¡£
¥á¥Ë¥å¡¼¹àÌܤ¬Áª¤Ð¤ì¤¿¤é¡¢°ìÃפ¹¤ë¥á¥Ë¥å¡¼¥¤¥Ù¥ó¥È¤¬À¸À®¤µ¤ì¡¢
Ä̾ï¤ÈƱ¤¸¤è¤¦¤Ë½èÍý¤µ¤ì¤ë¡£
Pops up the given menu at the specified coordinates, relative to this
window, and returns control when the user has dismissed the menu. If a
menu item is selected, the corresponding menu event is generated and will be
processed as usually.
Parameters
menu
¥Ý¥Ã¥×¥¢¥Ã¥×¤¹¤ë¥á¥Ë¥å¡¼
Menu to pop up.
pos
x
y
See also
wxMenu
Remarks
¥á¥Ë¥å¡¼¤¬¥Ý¥Ã¥×¥¢¥Ã¥×¤µ¤ì¤ëľÁ°¤Ë¡¢
¥á¥Ë¥å¡¼¥¢¥¤¥Æ¥à¤¬Àµ³Î¤Ê¾õÂ֤Ǥ¢¤ë¤³¤È¤òÊݾڤ¹¤ë¤¿¤á¤Ë¡¢
wxMenu::UpdateUI ¤¬¸Æ¤Ð¤ì¤ë¡£
¥á¥Ë¥å¡¼¤Ï¥¦¥£¥ó¥É¥¦¤Ë¤è¤Ã¤Æ¡¢¥Ç¥ê¡¼¥È¤µ¤ì¤Ê¤¤¡£
Just before the menu is popped up,
wxMenu::UpdateUI is called
to ensure that the menu items are in the correct state. The menu does not get deleted
by the window.
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
PopupMenu(menu, point)
|
Specifies position with a wxPoint
|
PopupMenuXY(menu, x, y)
|
Specifies position with two integers (x, y)
|
wxWindow::PushEventHandler
void PushEventHandler(wxEvtHandler* handler)
¤³¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤ò¥¦¥£¥ó¥É¥¦¤Î¥¤¥Ù¥ó¥È¥¹¥¿¥Ã¥¯¤Ë¥×¥Ã¥·¥å¤¹¤ë¡£
Pushes this event handler onto the event stack for the window.
Parameters
handler
Remarks
¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ï¡¢¥¦¥£¥ó¥É¥¦¤ËÁ÷¤é¤ì¤¿¥¤¥Ù¥ó¥È¤ò½èÍý¤Ç¤¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë¡£
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤½¤Î¥¦¥£¥ó¥É¥¦¤¬¡¢¤½¤ì¼«¿È¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ç¤¢¤ë¤¬¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¾¤Î¤â¤Î¤ËÃÖ¤´¹¤¨¤Æ¤â¤è¤¤¡£
Î㤨¤Ð¡¢°ã¤¦¼ïÎà¤Î¥¦¥£¥ó¥É¥¦¥¯¥é¥¹¤Ç¤â¡¢¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Î¼ÂÁõ¤òµö¤¹¤¿¤á¤Ê¤É¤Ç¤¢¤ë¡£
wxWindow::PushEventHandler ¤Ï¡¢
¤¢¤ë¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤¬º¿¤ÎÃæ¤Ç¡¢¼¡¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤ËÁ÷¤é¤Ê¤«¤Ã¤¿¤³¤È¤Ç¡¢
¥¤¥Ù¥ó¥È¤¬¥Ï¥ó¥É¥ë¤µ¤ì¤Ê¤¤¾ì½ê¤Ç¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Îº¿¤ò¥»¥Ã¥È¥¢¥Ã¥×¤¹¤ë¤³¤È¤òµö¤¹¡£
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
wxWindow::PushEventHandler allows
an application to set up a chain of event handlers, where an event not handled by one event handler is
handed to the next one in the chain. Use wxWindow::PopEventHandler to
remove the event handler.
See also
wxWindow::SetEventHandler,
wxWindow::GetEventHandler,
wxWindow::PopEventHandler,
wxEvtHandler::ProcessEvent,
wxEvtHandler
wxWindow::Raise
void Raise()
´ÉÍý¤µ¤ì¤¿¥¦¥£¥ó¥É¥¦¡Êdialog ¤Þ¤¿¤Ï frame¡Ë¤Ê¤é¡¢¥¦¥£¥ó¥É¥¦³¬ÁؤΥȥåפؾ夲¤ë¡£
Raises the window to the top of the window hierarchy if it is a managed window (dialog
or frame).
wxWindow::Refresh
virtual void Refresh(bool eraseBackground = TRUE, const wxRect* rect
= NULL)
¥¦¥£¥ó¥É¥¦¤òºÆÉÁ²è¤¹¤ë¤¿¤á¤Ë¡¢¥á¥Ã¥»¡¼¥¸¤äÀ¸À®¤¹¤Ù¤¥¤¥Ù¥ó¥È¤ò°ú¤µ¯¤³¤¹¡£
Causes a message or event to be generated to repaint the
window.
Parameters
eraseBackground
rect
NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢Í¿¤¨¤é¤ì¤¿¶ë·ÁÎΰè¤À¤±¤¬¡¢Èï³²¤ò¼õ¤±¤¿¤â¤Î¤È¤·¤Æ°·¤ï¤ì¤ë¡£
If non-NULL, only the given rectangle will
be treated as damaged.
See also
wxWindow::RefreshRect
wxWindow::RefreshRect
virtual void Refresh(const wxRect& rect)
Í¿¤¨¤é¤ì¤¿¶ë·ÁÎΰè¤ÎÆâÍÆ¤òºÆÉÁ²è¤¹¤ë¡£¡Ê¤½¤ÎÆâÉô¤ÎÎΰ褬ºÆÉÁ²è¤µ¤ì¤ë¡Ë
¤³¤ì¤Ï¡¢¤è¤ê¤è¤¤¹½Ê¸¤ò»ý¤Ã¤Æ¤¤¤ë°Ê³°¤Ï¡¢
Refresh ¤ÈƱ¤¸¤Ç¤¢¤ë¡£
Redraws the contents of the given rectangle: the area inside it will be
repainted.
This is the same as Refresh but has a nicer syntax.
wxWindow::ReleaseMouse
virtual void ReleaseMouse()
See also
wxWindow::CaptureMouse,
wxWindow::HasCapture,
wxWindow::ReleaseMouse,
wxMouseCaptureChangedEvent
wxWindow::RemoveChild
virtual void RemoveChild(wxWindow* child)
»Ò¥¦¥£¥ó¥É¥¦¤ò¼è¤ê½ü¤¯¡£
¤³¤ì¤Ï¥¦¥£¥ó¥É¥¦¤Î¥Ç¥ê¡¼¥È´Ø¿ô¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë¸Æ¤Ð¤ì¤ë¤Î¤Ç¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥Þ¤¬Ì¿Î᤹¤Ù¤¤Ç¤Ï¤Ê¤¤¡£
Removes a child window. This is called automatically by window deletion
functions so should not be required by the application programmer.
Parameters
child
¼è¤ê½ü¤¯»Ò¥¦¥£¥ó¥É¥¦¡£
Child window to remove.
wxWindow::RemoveEventHandler
bool RemoveEventHandler(wxEvtHandler *handler)
¥¦¥£¥ó¥É¥¦¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Îº¿¤Ç¡¢Í¿¤¨¤é¤ì¤¿ handler ¤ò¸«¤Ä¤±¡¢
¼è¤ê½ü¤¯¡Ê¥Ç¥ê¡¼¥È¤¹¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡Ë
Find the given
handler in the windows event handler chain and remove (but
not delete) it from it.
Parameters
handler
¼è¤ê½ü¤¯¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¡£
NULL ¤Ç¤Ê¤¯¡¢¤½¤·¤Æ¡¢¥¦¥£¥ó¥É¥¦¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Îº¿¤Ë¸ºß¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
The event handler to remove, must be non NULL and
must be present in this windows event handlers chain
Return value
¸«¤Ä¤«¤ì¤Ð TRUE ¤òÊÖ¤¹¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð FALSE ¡£
¡Ê¤³¤ì¤Ï¤Þ¤¿¡¢¼ºÇԤ˽ª¤ï¤Ã¤¿¤³¤È¤ò¤¢¤é¤ï¤¹¡£¤À¤«¤é¤³¤Î´Ø¿ô¤Ï¡¢
¤½¤³¤Ç¡¢¥Ï¥ó¥É¥é¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Î¤ß¸Æ¤Ð¤ì¤ë¤Ù¤¤Ç¤¢¤ë¡£¡Ë
Returns
TRUE if it was found and
FALSE otherwise (this also results
in an assert failure so this function should only be called when the
handler is supposed to be there).
See also
PushEventHandler,
PopEventHandler
wxWindow::Reparent
virtual bool Reparent(wxWindow* newParent)
¥¦¥£¥ó¥É¥¦¤Î¿Æ¤òÆþ¤ìÂØ¤¨¤ë¡£
¤¹¤Ê¤ï¤Á¡¢¥¦¥£¥ó¥É¥¦¤Ï¸½ºß¤Î¿Æ¥¦¥£¥ó¥É¥¦¡ÊÎ㤨¤Ð¡¢wxFrame ¤Ë¤¢¤ë Èóɸ½à¤Î¥Ä¡¼¥ë¥Ð¡¼¡Ë
¤«¤é¼è¤ê½ü¤«¤ì¡¢¤½¤·¤Æ¤½¤ì¤«¤é¾¤ÎÃæ¤ËÁÞÆþ¤µ¤ìľ¤¹¡£
Windows ¤È GTK ¤ÇÍøÍѤǤ¤ë¡£
Reparents the window, i.e the window will be removed from its
current parent window (e.g. a non-standard toolbar in a wxFrame)
and then re-inserted into another. Available on Windows and GTK.
Parameters
newParent
wxWindow::ScreenToClient
virtual void ScreenToClient(int* x, int* y) const
virtual wxPoint ScreenToClient(const wxPoint& pt) const
¥¹¥¯¥ê¡¼¥ó¤«¤é¡¢¥¯¥é¥¤¥¢¥ó¥È¥¦¥£¥ó¥É¥¦¤ÎºÂɸ¤ËÊÑ´¹¤¹¤ë
Converts from screen to client window coordinates.
Parameters
x
y
pt
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
ScreenToClient(point)
|
¼õ¤±¼è¤ê¡¢¤½¤·¤ÆwxPoint¤òÊÖ¤¹¡£
Accepts and returns a wxPoint
|
ScreenToClientXY(x, y)
|
£²¤Ä¤ÎÍ×ÁǤò»ý¤Ä¥¿¥×¥ë(x, y)¤òÊÖ¤¹¡£
Returns a 2-tuple, (x, y)
|
wxWindow::ScrollLines
virtual bool ScrollLines(int lines)
Í¿¤¨¤é¤ì¤¿¹Ô¿ô¤À¤±¡¢¥¦¥£¥ó¥É¥¦¤ò²¼¡Êlines ¤¬Àµ¤Ê¤é¡Ë¤«¾å¤Ë¥¹¥¯¥í¡¼¥ë¤¹¤ë¡£
Scrolls the window by the given number of lines down (if
lines is
positive) or up.
Return value
¥¦¥£¥ó¥É¥¦¤¬¥¹¥¯¥í¡¼¥ë¤µ¤ì¤¿¤é¡¢TRUE¡£
´û¤Ë top ¤« bottom ¤Ë¤¢¤Ã¤Æ¡¢²¿¤â¤µ¤ì¤Ê¤±¤ì¤Ð FALSE¡£
Returns
TRUE if the window was scrolled,
FALSE if it was already
on top/bottom and nothing was done.
Remarks
¤³¤Î´Ø¿ô¤Ï¸½ºß¡¢MSW ¤È¡¢wxGTK²¼¤Î wxTextCtrl ¤Ç¤Î¤ß¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
¡Ê¤¹¤Ù¤Æ¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à²¼¤Î wxScrolledWindow ¤«¤éÇÉÀ¸¤¹¤ë¥¯¥é¥¹¤Ç¤âƯ¤¯¡Ë
This function is currently only implemented under MSW and wxTextCtrl under
wxGTK (it also works for wxScrolledWindow derived classes under all
platforms).
See also
ScrollPages
wxWindow::ScrollPages
virtual bool ScrollPages(int pages)
Í¿¤¨¤é¤ì¤¿¥Ú¡¼¥¸¿ô¤À¤±¡¢¥¦¥£¥ó¥É¥¦¤ò²¼¡Êpages ¤¬Àµ¤Ê¤é¡Ë¤«¾å¤Ë¥¹¥¯¥í¡¼¥ë¤¹¤ë¡£
Scrolls the window by the given number of pages down (if
pages is
positive) or up.
¥¦¥£¥ó¥É¥¦¤¬¥¹¥¯¥í¡¼¥ë¤µ¤ì¤¿¤é¡¢TRUE¡£
´û¤Ë top ¤« bottom ¤Ë¤¢¤Ã¤Æ¡¢²¿¤â¤µ¤ì¤Ê¤±¤ì¤Ð FALSE¡£
Return value
Returns TRUE if the window was scrolled, FALSE if it was already
on top/bottom and nothing was done.
Remarks
¤³¤Î´Ø¿ô¤Ï¸½ºß¡¢MSW ¤È¡¢wxGTK²¼¤Î wxTextCtrl ¤Ç¤Î¤ß¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
¡Ê¤¹¤Ù¤Æ¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à²¼¤Î wxScrolledWindow ¤«¤éÇÉÀ¸¤¹¤ë¥¯¥é¥¹¤Ç¤âƯ¤¯¡Ë
This function is currently only implemented under MSW and wxTextCtrl under
wxGTK (it also works for wxScrolledWindow derived classes under all
platforms).
See also
ScrollLines
wxWindow::ScrollWindow
virtual void ScrollWindow(int dx, int dy, const wxRect* rect = NULL)
¤³¤Î¥¦¥£¥ó¥É¥¦¤ÇʪÍýŪ¤Ê¥Ô¥¯¥»¥ëñ°Ì¤Ç¥¹¥¯¥í¡¼¥ë¤¹¤ë¡£¤¹¤Ê¤ï¤Á»Ò¥¦¥£¥ó¥É¥¦¤òư¤«¤¹¡£
Physically scrolls the pixels in the window and move child windows accordingly.
Parameters
dx
dy
rect
̵¸ú¤Ë¤¹¤ë¶ë·ÁÎΰ衣
NULL ¤Ê¤é¡¢¥¦¥£¥ó¥É¥¦Á´ÂΤ¬Ìµ¸ú¤Ë¤Ê¤ë¡£
¥¹¥¯¥í¡¼¥ë¤Ë¤è¤Ã¤ÆÉ½¼¨¤µ¤ì¤¿¥¦¥£¥ó¥É¥¦¤ÎÎΰè¤È¡¢°ìÃפ¹¤ë¶ë·ÁÎΰè¤òÅϤ¹¤Ê¤é¡¢
¥Ú¥¤¥ó¥Æ¥£¥ó¥°¥Ï¥ó¥É¥é¤Ï¡¢Ìµ¸ú¤ÊÎΰè¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤ÇÉÁ²è¤òºÇŬ²½¤Ç¤¤ë¡£
¤³¤Î°ú¿ô¤Ï¡¢GTK²¼¤Ç¤Ï̵»ë¤µ¤ì¤ë¡£
Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you
pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler
can optimize painting by checking for the invalidated region. This parameter is ignored under GTK.
Remarks
¤¢¤Ê¤¿¤Î¥¹¥¯¥í¡¼¥ë¤Î¼ÂÁõ¤ò¡¢ºÇ¾®¤ÎÎΰ褬ºÆÉÁ²è¤µ¤ì¤ë¤³¤È¤Ç¡¢ºÇŬ²½¤¹¤ë¤¿¤á¤Ë¡¢¤³¤Î´Ø¿ô¤ò»È¤¤¤Ê¤µ¤¤¡£
¥á¥â¡§¤Þ¤ì¤Ë¡¢¥æ¡¼¥¶¥×¥í¥°¥é¥à¤«¤é¤³¤Î´Ø¿ô¤ò¸Æ¤Ö¤³¤È¤¬É¬ÍפǤ¢¤ë¡£
Use this function to optimise your scrolling implementations, to minimise the area that must be
redrawn. Note that it is rarely required to call this function from a user program.
wxWindow::SetAcceleratorTable
virtual void SetAcceleratorTable(const wxAcceleratorTable& accel)
wxWindow::SetAutoLayout
void SetAutoLayout(bool autoLayout)
¥¦¥£¥ó¥É¥¦¤¬¥ê¥µ¥¤¥º¤µ¤ì¤¿¤È¤¤Ë¡¢¼«Æ°Åª¤Ë
wxWindow::Layout ´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹¤«¤É¤¦¤«¤ò·è¤á¤ë¡£
¤½¤ì¤Ï¡¢
wxWindow::SetSizer ¤Ë¤è¤Ã¤Æ
°ÅÌÛŪ¤Ë¸Æ¤Ð¤ì¤ë¤¬¡¢
wxWindow::SetConstraints
¤ò»È¤¦¤Ê¤é¡¢¼êư¤Ç¸Æ¤Ö¤Ù¤¤À¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¥µ¥¤¥º¤¬Êѹ¹¤µ¤ì¤¿¤È¤¤Ë¡¢
¥¦¥£¥ó¥É¥¦¥ì¥¤¥¢¥¦¥È¤ÏÀµ¤·¤¯¹¹¿·¤µ¤ì¤Ê¤¤¤À¤í¤¦¡£
Determines whether the
wxWindow::Layout function will
be called automatically when the window is resized. It is called implicitly by
wxWindow::SetSizer but if you use
wxWindow::SetConstraints you should call it
manually or otherwise the window layout won't be correctly updated when its
size changes.
Parameters
autoLayout
See also
wxWindow::SetConstraints
wxWindow::SetBackgroundColour
virtual void SetBackgroundColour(const wxColour& colour)
¥¦¥£¥ó¥É¥¦¤ÎÇØ·Ê¿§¤òÀßÄꤹ¤ë¡£
Sets the background colour of the window.
Parameters
colour
Remarks
ÇØ·Ê¿§¤ÏÉáÄÌ¡¢Windouws ¤Ç¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î
wxEraseEvent
¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é´Ø¿ô¤Ë¤è¤Ã¤Æ¡¢GTK ¤Ç¤Ï¼«Æ°Åª¤Ë¡¢ÉÁ¤«¤ì¤ë¡£
ÇØ·Ê¿§¤ÎÀßÄê¤Ï¡¢¤¹¤°¤Ë¥ê¥Õ¥ì¥Ã¥·¥å¤·¤Ê¤¤¤Î¤Ç¡¢¤³¤Î´Ø¿ô¤ò¸Æ¤ó¤À¸å¤Ë¡¢
wxWindow::Clear ¤« wxWindow::Refresh
¤ò¸Æ¤ó¤À¤Û¤¦¤¬¤è¤¤¤³¤È¤ËÃí°Õ¡£
¥¦¥£¥ó¥É¥¦¤Ï¡¢"Themes"¡Ê¤¹¤Ê¤ï¤Á¡¢¤½¤Î¸«±É¤¨¤ò¡¢¥æ¡¼¥¶¤¬Ë¾¤à¥é¥ó¥¿¥¤¥à¥í¡¼¥É²Äǽ¥â¥¸¥å¡¼¥ë¤ÇÊѤ¨¤ë¡¢GTK¤ÎǽÎÏ¡Ë
¤¬»È¤ï¤ì¤ë¤È¤¡¢¥¦¥£¥ó¥É¥¦¤Î¿·¤·¤¤³µ´Ñ¤¬Æ±¤¸¤Ë¸«¤¨¤Ê¤¤¤À¤í¤¦¤«¤é¡¢
GTK¤Ç¤Ï¡¢¤³¤Î´Ø¿ô¤ò»È¤¤¤Ê¤µ¤¤¡£
The background colour is usually painted by the default
wxEraseEvent event handler function
under Windows and automatically under GTK.
Note that setting the background colour does not cause an immediate refresh, so you
may wish to call wxWindow::Clear or wxWindow::Refresh after
calling this function.
Use this function with care under GTK as the new appearance of the window might
not look equally well when used with "Themes", i.e GTK's ability to change its
look as the user wishes with run-time loadable modules.
See also
wxWindow::GetBackgroundColour,
wxWindow::SetForegroundColour,
wxWindow::GetForegroundColour,
wxWindow::Clear,
wxWindow::Refresh,
wxEraseEvent
wxWindow::SetCaret
void SetCaret(wxCaret *caret) const
¥¦¥£¥ó¥É¥¦¤È´ØÏ¢ÉÕ¤±¤é¤ì¤¿
caret¤òÀßÄꤹ¤ë¡£
Sets the
caret associated with the window.
wxWindow::SetClientSize
virtual void SetClientSize(int width, int height)
virtual void SetClientSize(const wxSize& size)
¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¤Î¥µ¥¤¥º¤òÀßÄꤹ¤ë¡£
¤³¤Î´Ø¿ô¤ò»È¤¦¤³¤È¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤òÀßÄꤹ¤ë¤³¤È¤Ï¡¢
wxWindow::SetSize ¤ò¤è¤ê¡¢
¥Ç¥Ð¥¤¥¹¤Ë°Í¸¤·¤Ê¤¤·¹¸þ¤Ë¤¢¤ë¡£
Î㤨¤Ð¡¢¥Ñ¥Í¥ë¥¢¥¤¥Æ¥à¤Î¼þ¤ê¤Ë¥¦¥£¥ó¥É¥¦¤ò¹ç¤ï¤»¤è¤¦¤È¤¹¤ë¤È¤¡¢
¥Ü¡¼¥À¡¼¤ä¥¿¥¤¥È¥ë¥Ð¡¼¤¬¡¢¤É¤ì¤¯¤é¤¤¤ÎÉý¤Ê¤Î¤«¤ò¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ïµ¤¤Ë¤·¤Ê¤¯¤Æ¤è¤¤¤«¤é¤À¡£
This sets the size of the window client area in pixels. Using this function to size a window
tends to be more device-independent than
wxWindow::SetSize, since the application need not
worry about what dimensions the border or title bar have when trying to fit the window
around panel items, for example.
Parameters
width
height
size
wxPython note:
¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë¡¢wxPython¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¡£
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
SetClientSize(size)
|
wxSize ¤ò¼õ¤±¼è¤ë¡£
Accepts a wxSize
|
SetClientSizeWH(width, height)
|
|
wxWindow::SetContainingSizer
void SetContainingSizer(wxSizer* sizer)
¤³¤ì¤Ï¡¢ÄÌ¾ï¥æ¡¼¥¶¥³¡¼¥É¤Ë¤è¤Ã¤Æ¸Æ¤ÖɬÍפϤʤ¤¡£
¥¦¥£¥ó¥É¥¦¤¬sizer¤ËÄɲ䵤졢»È¤ï¤ì¤¿¤È¤¤Ë¸Æ¤Ð¤ë¤Î¤Ç¡¢
¥¦¥£¥ó¥É¥¦¤¬Ç˲õ¤µ¤ì¤ë¤È¤¤Ë¡¢sizer¤«¤é¼«Ê¬¼«¿È¤ò¼è¤ê½ü¤¯¤³¤È¤¬¤Ç¤¤ë¡£
This normally does not need to be called by user code. It is called
when a window is added to a sizer, and is used so the window can
remove itself from the sizer when it is destroyed.
wxWindow::SetCursor
virtual void SetCursor(const wxCursor&cursor)
¥¦¥£¥ó¥É¥¦¥«¡¼¥½¥ë¤òÀßÄꤹ¤ë¡£
°ÅÌÛŪ¤Ë¡¢¥¦¥£¥ó¥É¥¦¤Î»Ò¤Ë¤â¥«¡¼¥½¥ë¤òÀßÄꤹ¤ë¤³¤È¤ËÃí°Õ¡£
¥¦¥£¥ó¥É¥¦¥«¡¼¥½¥ë¤¬¥Ç¥Õ¥©¥ë¥È¤ËÌᤵ¤ì¤ë¾ì¹ç¡¢
cursor ¤Ï wxNullCursor ¤Ç¤â¤è¤¤¡£
Sets the window's cursor. Notice that the window cursor also sets it for the
children of the window implicitly.
The cursor may be wxNullCursor in which case the window cursor will
be reset back to default.
Parameters
cursor
See also
::wxSetCursor, wxCursor
wxWindow::SetConstraints
void SetConstraints(wxLayoutConstraints* constraints)
¥¦¥£¥ó¥É¥¦¤¬¡¢Í¿¤¨¤é¤ì¤¿ layout constraints ¤ò»ý¤Ä¤è¤¦¤ËÀßÄꤹ¤ë¡£
¥¦¥£¥ó¥É¥¦¤Ï¡¢¤½¤Î¤È¤¤Ë¥ª¥Ö¥¸¥§¥¯¥È¤ò½êͤ·¤Æ¤ª¤ê¡¢¤½¤Î¥Ç¥ê¡¼¥È¤ò½èÍý¤¹¤ë¤À¤í¤¦¡£
¸½¾õ¤Î layout constraints ¥ª¥Ö¥¸¥§¥¯¥È¤¬¡¢¥¦¥£¥ó¥É¥¦¤Ë¤è¤Ã¤Æ´û¤Ë½êͤµ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
¤½¤ì¤Ï¡¢ºï½ü¤µ¤ì¤ë¤À¤í¤¦¡£
Sets the window to have the given layout constraints. The window
will then own the object, and will take care of its deletion.
If an existing layout constraints object is already owned by the
window, it will be deleted.
Parameters
constraints
Remarks
OnSize ¤Ç¡¢¼«Æ°Åª¤Ëconstraints¤ò»È¤¦¤³¤È¤ò¥¦¥£¥ó¥É¥¦¤ËÃΤ餻¤ë¤¿¤á¤Ë¡¢
wxWindow::SetAutoLayout ¤ò¸Æ¤Ð¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢OnSize ¤ò¥ª¡¼¥Ð¥é¥¤¥É¤·¤Æ¡¢ÌÀ¼¨Åª¤Ë Layout() ¤ò¸Æ¤Ð¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
wxLayoutConstraints ¤È
wxSizer ¤ÎξÊý¤òÀßÄꤹ¤ë¾ì¹ç¡¢
sizer¤À¤±¤¬¸ú²Ì¤¬¤¢¤ë¡£
You must call
wxWindow::SetAutoLayout to tell a window to use
the constraints automatically in OnSize; otherwise, you must override OnSize and call Layout()
explicitly. When setting both a wxLayoutConstraints and a
wxSizer, only the
sizer will have effect.
wxWindow::SetDropTarget
void SetDropTarget(wxDropTarget* target)
¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¥É¥í¥Ã¥×¥¿¡¼¥²¥Ã¥È¤ò·ë¤Ó¤Ä¤±¤ë¡£
¥¦¥£¥ó¥É¥¦¤¬¡¢´û¤Ë¥É¥í¥Ã¥×¥¿¡¼¥²¥Ã¥È¤ò»ý¤Ã¤Æ¤¤¤ì¤Ð¡¢¤½¤ì¤Ï¥Ç¥ê¡¼¥È¤µ¤ì¤ë¡£
Associates a drop target with this window.
If the window already has a drop target, it is deleted.
See also
wxWindow::GetDropTarget,
Drag and drop overview
wxWindow::SetEventHandler
void SetEventHandler(wxEvtHandler* handler)
¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤òÀßÄꤹ¤ë¡£
Sets the event handler for this window.
Parameters
handler
Remarks
¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ï¡¢¥¦¥£¥ó¥É¥¦¤ËÁ÷¤é¤ì¤¿¥¤¥Ù¥ó¥È¤ò½èÍý¤Ç¤¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë¡£
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤½¤Î¥¦¥£¥ó¥É¥¦¤¬¡¢¤½¤ì¼«¿È¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ç¤¢¤ë¤¬¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¾¤Î¤â¤Î¤ËÃÖ¤´¹¤¨¤Æ¤â¤è¤¤¡£
Î㤨¤Ð¡¢°ã¤¦¼ïÎà¤Î¥¦¥£¥ó¥É¥¦¥¯¥é¥¹¤Ç¤â¡¢¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Î¼ÂÁõ¤òµö¤¹¤¿¤á¤Ê¤É¤Ç¤¢¤ë¡£
Ä̾ï¤Ï¡¢wxWindow::PushEventHandler
¤ò»È¤¦Êý¤¬Îɤ¤¡£
¤¢¤ë¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤¬º¿¤ÎÃæ¤Ç¡¢¼¡¤Î¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤ËÁ÷¤é¤Ê¤«¤Ã¤¿¤³¤È¤Ç¡¢
¥¤¥Ù¥ó¥È¤¬¥Ï¥ó¥É¥ë¤µ¤ì¤Ê¤¤¾ì½ê¤Ç¡¢¤³¤ì¤¬¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Îº¿¤òÀßÄꤹ¤ë¤«¤é¤À¡£
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
It is usually better to use wxWindow::PushEventHandler since
this sets up a chain of event handlers, where an event not handled by one event handler is
handed to the next one in the chain.
See also
wxWindow::GetEventHandler,
wxWindow::PushEventHandler,
wxWindow::PopEventHandler,
wxEvtHandler::ProcessEvent,
wxEvtHandler
wxWindow::SetExtraStyle
void SetExtraStyle(long exStyle)
¥¦¥£¥ó¥É¥¦¤Ë extra style bits ¤òÀßÄꤹ¤ë¡£
¸½ºßÄêµÁ¤µ¤ì¤Æ¤¤¤ë extra style bits ¤Ï¡§
Sets the extra style bits for the window. The currently defined extra style
bits are:
wxWS_EX_VALIDATE_RECURSIVELY
|
¤³¤Î¥¹¥¿¥¤¥ë¤Î¥Õ¥é¥°¤ò¥»¥Ã¥È¤¹¤ë¤Ê¤é¡¢
TransferDataTo/FromWindow() ¤È Validate() ¥á¥½¥Ã¥É¤Ï¡¢ºÆµ¢Åª¤Ë
¥¦¥£¥ó¥É¥¦¤Î¤¹¤Ù¤Æ¤Î»Ò¤Ë¹ß¤ê¤«¤«¤ë¤À¤í¤¦¡£
TransferDataTo/FromWindow()
and Validate() methods will recursively descend into all children of the
window if it has this style flag set.
|
wxWS_EX_BLOCK_EVENTS
|
Ä̾ï¤Ï¡¢¥³¥Þ¥ó¥É¥¤¥Ù¥ó¥È¤Ï¡¢¤½¤ì¤é¤Î¤¿¤á¤Î¥Ï¥ó¥É¥é¤¬¸«¤Ä¤«¤ë¤Þ¤Ç¡¢
¿Æ¥¦¥£¥ó¥É¥¦¤Ø¾å¸þ¤¤ÇºÆµ¢Åª¤ËÅÁ¤¨¤é¤ì¤ë¡£
¤³¤Î¥¹¥¿¥¤¥ë¤Ï¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¤ò±Û¤¨¤ÆÅÁ㤵¤ì¤ë¤Î¤òËɤ°¡£
event processing overview
¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ë¡¢wxDialog ¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤³¤Î¥¹¥¿¥¤¥ë¤ò»ý¤Ã¤Æ¤¤¤ë¤³¤È¤ËÃí°Õ¡£
Normally, the command
events are propagated upwards to the window parent recursively until a handler
for them is found. Using this style allows to prevent them from being
propagated beyond this window. Notice that wxDialog has this style on by
default for the reasons explained in the
event processing overview.
|
wxWS_EX_TRANSIENT
|
¤³¤ì¤Ï¡¢¥¦¥£¥ó¥É¥¦¤¬¿ÆÌµ¤·¤Çºî¤é¤ì¤¿¥À¥¤¥¢¥í¥°¤Î¡¢
°ÅÌۤοƤȤ·¤Æ»È¤ï¤ì¤ë¤Î¤òËɤ°¤³¤È¤¬¤Ç¤¤ë¡£
¤½¤Î¤³¤È¤Ï¡¢¤¤¤Ä¤Ç¤â¸«¤¨¤Ê¤¯¤Ê¤ë¤³¤È¤¬¤Ç¤¤ë¥¦¥£¥ó¥É¥¦¤ÇÊØÍø¤Ç¤¢¤ë¡£
¤½¤Î¤è¤¦¤Ê¥¦¥£¥ó¥É¥¦¤Î»Ò¤òºî¤ë¤³¤È¤Ï¡¢Ã×̿Ū¤Ê·ë²Ì¤Ë¤Ê¤ë¤«¤é¤À¡£
This can be used to prevent a
window from being used as an implicit parent for the dialogs which were
created without a parent. It is useful for the windows which can disappear at
any moment as creating children of such windows results in fatal problems.
|
wxFRAME_EX_CONTEXTHELP
|
Windows¤Ç¤Ï¡¢¥¥ã¥×¥·¥ç¥ó¤Ëµ¿Ìä¥Ü¥¿¥ó¤ò¤ª¤¯¡£
¥Ü¥¿¥ó¤¬²¡¤µ¤ì¤ë¤È¡¢Windows ¤Ï¡¢context-sensitive¥Ø¥ë¥×¥â¡¼¥É¤ËÆþ¤ê¡¢
¤½¤·¤Æ¡¢¥æ¡¼¥¶¤¬¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥¦¥£¥ó¥É¥¦¤ò¥¯¥ê¥Ã¥¯¤·¤¿¤é¡¢
wxWidgets ¤Ï¡¢ wxEVT_HELP ¥¤¥Ù¥ó¥È¤òÁ÷¤ë¡£
¤³¤Î¥¹¥¿¥¤¥ë¤Ï¡¢wxMAXIMIZE_BOX ¤ä wxMINIMIZE_BOX ¤È°ì½ï¤Ë»È¤¨¤Ê¤¤¡£
¤À¤«¤é¡¢¤³¤Î¥¹¥¿¥¤¥ë¤ò»ý¤Ä¥Õ¥ì¡¼¥à¡Ê¥À¥¤¥¢¥í¥°¤ÏºÇ¾®¥Ü¥Ã¥¯¥¹¤âºÇÂç¥Ü¥Ã¥¯¥¹¤â¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï»ý¤Ã¤Æ¤¤¤Ê¤¤¡Ë¤Ç¤Ï¡¢
wxDEFAULT_FRAME_STYLE & ~(wxMINIMIZE_BOX | wxMAXIMIZE_BOX)
¤Î¥¹¥¿¥¤¥ë¤ò»È¤¦¤Ù¤¤Ç¤¢¤ë¡£
Under Windows, puts a query button on the
caption. When pressed, Windows will go into a context-sensitive help mode and wxWidgets will send
a wxEVT_HELP event if the user clicked on an application window.
This style cannot be used together with wxMAXIMIZE_BOX or wxMINIMIZE_BOX, so
you should use the style of
wxDEFAULT_FRAME_STYLE & (wxMINIMIZE_BOX | wxMAXIMIZE_BOX) for the
frames having this style (the dialogs don't have minimize nor maximize box by
default)
|
wxWindow::SetFocus
virtual void SetFocus()
¥¦¥£¥ó¥É¥¦¤¬¡¢¥¡¼¥Ü¡¼¥ÉÆþÎϤò¼õ¤±¼è¤ë¤è¤¦¤ËÀßÄꤹ¤ë
This sets the window to receive keyboard input.
See also
wxFocusEvent
wxWindow::SetFocusFromKbd
virtual void SetFocusFromKbd()
¤³¤Î´Ø¿ô¤Ï¡¢¥æ¡¼¥¶¤¬¥¡¼¥Ü¡¼¥É¤«¤é¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¥Õ¥©¡¼¥«¥¹¤òÍ¿¤¨¤¿¤È¤¤Ë
¡ÊÎ㤨¤Ð
TAB ¥¡¼¤ò»È¤Ã¤Æ¡Ë¡¢wxWidgets ¤Î¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥³¡¼¥É¤Ë¤è¤Ã¤Æ¸Æ¤Ð¤ì¤ë¡£
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤Ïñ¤Ë
SetFocus¤ò¸Æ¤Ö¤À¤±¤À¤¬¡¢
ÇÉÀ¸¥¯¥é¥¹¤Ç¡¢ÄɲäǤ³¤ì¤Ë²¿¤«¤¹¤ë¤¿¤á¤Ë¥ª¡¼¥Ð¥é¥¤¥É¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
This function is called by wxWidgets keyboard navigation code when the user
gives the focus to this window from keyboard (e.g. using
TAB key).
By default this method simply calls
SetFocus but
can be overridden to do something in addition to this in the derived classes.
wxWindow::SetFont
void SetFont(const wxFont& font)
¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¥Õ¥©¥ó¥È¤òÀßÄꤹ¤ë¡£
Sets the font for this window.
Parameters
font
See also
wxWindow::GetFont
wxWindow::SetForegroundColour
virtual void SetForegroundColour(const wxColour& colour)
¤³¤Î¥¦¥£¥ó¥É¥¦¤ÎÁ°·Ê¿§¤òÀßÄꤹ¤ë¡£
Sets the foreground colour of the window.
Parameters
colour
Remarks
Á°·Ê¿§¤Î²ò¼á¤Ï¡¢¥¦¥£¥ó¥É¥¦¥¯¥é¥¹¤Ë¤è¤Ã¤Æ²ò¼á¤µ¤ì¤ë¡£
¥Æ¥¥¹¥È¤Î¿§¤ä¡¢¤½¤Î¾¤Î¿§¤Ë¤Ê¤Ã¤Æ¤âÎɤ¤¤·¡¢Á´¤¯»È¤ï¤ì¤Ê¤¯¤Æ¤âÎɤ¤¡£
¥á¥â¡§GTK²¼¤Ç¤³¤Î´Ø¿ô¤ò»È¤¦¤È¤¤Ï¡¢"themes"¡Ê¤¹¤Ê¤ï¤Á¡¢¥æ¡¼¥¶¤¬Áª¤ó¤À¥¦¥£¥ó¥É¥¦¤È¥³¥ó¥È¥í¡¼¥ë¤Î³µ´Ñ¡Ë
¤ò¡¢¤½¤ì¤é¤Î¿Æ¥¦¥£¥ó¥É¥¦¤Î themes ¤ò´Þ¤á¤Æ¡¢Ìµ¸ú¤Ë¤¹¤ë¤³¤È¤Ë¤Ê¤ë¤À¤í¤¦¡£
The interpretation of foreground colour is open to interpretation according
to the window class; it may be the text colour or other colour, or it may not
be used at all.
Note that when using this functions under GTK, you will disable the so called "themes",
i.e. the user chosen appearance of windows and controls, including the themes of
their parent windows.
See also
wxWindow::GetForegroundColour,
wxWindow::SetBackgroundColour,
wxWindow::GetBackgroundColour
wxWindow::SetHelpText
virtual void SetHelpText(const wxString& helpText)
¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¡¢context-sensitive¥Ø¥ë¥×¤È¤·¤Æ»È¤ï¤ì¤ë¥Ø¥ë¥×¥Æ¥¥¹¥È¤òÀßÄꤹ¤ë¡£
¥á¥â¡§¸½ºß¤Î wxHelpProvider ¤Î¼ÂÁõ¤Ë¤è¤Ã¤Æ¡¢
¼ÂºÝ¤Ë¥Æ¥¥¹¥È¤¬¥¹¥È¥¢¤µ¤ì¤ë¤Î¤Ç¡¢¥¦¥£¥ó¥É¥¦¥ª¥Ö¥¸¥§¥¯¥È¼«¿È¤ÎÃæ¤Ç¤Ï¤Ê¤¤¡£
Sets the help text to be used as context-sensitive help for this window.
Note that the text is actually stored by the current wxHelpProvider implementation,
and not in the window object itself.
See also
GetHelpText, wxHelpProvider
wxWindow::SetId
void SetId(int id)
¥¦¥£¥ó¥É¥¦¤Î£É£Ä¤òÀßÄꤹ¤ë¡£
Sets the identifier of the window.
Remarks
¤¤¤º¤ì¤Î¥¦¥£¥ó¥É¥¦¤âÀ°¿ô¤Î£É£Ä¤ò»ý¤Ã¤Æ¤¤¤ë¡£
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬£É£Ä¤òÍ¿¤¨¤é¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢£É£Ä¤ÏÀ¸À®¤µ¤ì¤ë¤À¤í¤¦¡£
Ä̾£É£Ä¤Ï¡¢ºîÀ®»þ¤ËÍ¿¤¨¡¢¸å¤Ç½¤Àµ¤¹¤ë¤Ù¤¤Ç¤Ï¤Ê¤¤¡£
Each window has an integer identifier. If the application has not provided one,
an identifier will be generated. Normally, the identifier should be provided
on creation and should not be modified subsequently.
See also
wxWindow::GetId,
Window identifiers
wxWindow::SetName
virtual void SetName(const wxString& name)
¥¦¥£¥ó¥É¥¦¤Î̾Á°¤òÀßÄꤹ¤ë¡£
Parameters
name
See also
wxWindow::GetName
wxWindow::SetPalette
virtual void SetPalette(wxPalette* palette)
wxWindow::SetScrollbar
virtual void SetScrollbar(int orientation, int position,
int thumbSize, int range,
bool refresh = TRUE)
Æâ¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¥×¥í¥Ñ¥Æ¥£¤òÀßÄꤹ¤ë¡£
Sets the scrollbar properties of a built-in scrollbar.
Parameters
orientation
position
thumbSize
¥¹¥¯¥í¡¼¥ëñ°Ì¤Ç¤Î¡¢thumb ¤Î¥µ¥¤¥º¡¢¤â¤·¤¯¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ÎÌܤ˸«¤¨¤ëÉôʬ¡£
The size of the thumb, or visible portion of the scrollbar, in scroll units.
range
refresh
¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤òºÆÉÁ²è¤¹¤ë¤Ê¤é¡¢TRUE¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢FALSE¡£
TRUE to redraw the scrollbar, FALSE otherwise.
Remarks
Ʊ¤¸¥Õ¥©¥ó¥È¤ò»È¤Ã¤Æ¡¢50¹Ô¤Î¥Æ¥¥¹¥È¤òɽ¼¨¤·¤¿¤¤¤È¤·¤è¤¦¡£
¥¦¥£¥ó¥É¥¦¤Ï¡¢°ìÅÙ¤Ë16¹Ô¤À¤±¸«¤ì¤ë¤è¤¦¤Ë¡¢Â礤µ¤¬¹ç¤ï¤µ¤ì¤Æ¤¤¤ë¡£
¤¢¤Ê¤¿¤Ï¡¢¼¡¤Îʸ¤ò»È¤¦¤À¤í¤¦¡§
SetScrollbar(wxVERTICAL, 0, 16, 50);
¥á¥â¡§¤³¤Î¥µ¥¤¥º¤Ç¤Ï¡¢thumb ¤Î°ÌÃ֤ϡ¢·è¤·¤Æ 50 - 16 ¤¹¤Ê¤ï¤Á¡¢34 ¤òͤ¨¤é¤ì¤Ê¤¤¡£
¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¸½ºß¤Î¥Ó¥å¡¼¥µ¥¤¥º¤òʸ»ú¤Î¹â¤µ¤Ç³ä¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢
¸½ºß¡¢²¿¹Ô¸«¤¨¤Æ¤¤¤ë¤«¤ò¡¢·èÄꤹ¤ë¤³¤È¤¬¤Ç¤¤ë¡£
¤¢¤Ê¤¿¼«¿È¤Î¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Îưºî¤òÄêµÁ¤·¤Æ¤¤¤ë¾ì¹ç¡¢
¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤¬ÊѤï¤ë¤È¤¡¢¾ï¤Ë¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ÎÀßÄê¤òºÆ·×»»¤¹¤ëɬÍפ¬¤¢¤ë¤À¤í¤¦¡£
¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î·×»»¤È¡¢SetScrollbar ¤Î¸Æ¤Ó½Ð¤·¤ò¡¢
½é´ü²½»þ¤È wxSizeEvent ¥Ï¥ó¥É¥é´Ø¿ô¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤ë¡¢
AdjustScrollbars ¤È̾ÉÕ¤±¤é¤ì¤¿´Ø¿ôÆâ¤ËÃÖ¤¯¤³¤È¤¬¤Ç¤¤ë¡£
Let's say you wish to display 50 lines of text, using the same font.
The window is sized so that you can only see 16 lines at a time.
You would use:
SetScrollbar(wxVERTICAL, 0, 16, 50);
Note that with the window at this size, the thumb position can never go
above 50 minus 16, or 34.
You can determine how many lines are currently visible by dividing the current view
size by the character height in pixels.
When defining your own scrollbar behaviour, you will always need to recalculate
the scrollbar settings when the window size changes. You could therefore put your
scrollbar calculations and SetScrollbar
call into a function named AdjustScrollbars, which can be called initially and also
from your wxSizeEvent handler function.
See also
Scrolling overview,
wxScrollBar, wxScrolledWindow
wxWindow::SetScrollPos
virtual void SetScrollPos(int orientation, int pos, bool refresh = TRUE)
Æâ¢¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î°ÌÃÖ¤òÀßÄꤹ¤ë¡£
Sets the position of one of the built-in scrollbars.
Parameters
orientation
pos
refresh
¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤òºÆÉÁ²è¤¹¤ë¤Ê¤é¡¢TRUE¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢FALSE¡£
TRUE to redraw the scrollbar, FALSE otherwise.
Remarks
¤³¤Î´Ø¿ô¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Î¥³¥ó¥Æ¥ó¥Ä¤ËľÀܱƶÁ¤·¤Ê¤¤¡£
¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î°À¤ò½ñ¤¤È¤á¡¢¤½¤·¤Æ¥³¥ó¥Æ¥ó¥Ä¤òºÆÉÁ²è¤¹¤ë¤Î¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¼¡Âè¤Ç¤¢¤ë¡£
This function does not directly affect the contents of the window: it is up to the
application to take note of scrollbar attributes and redraw contents accordingly.
See also
wxWindow::SetScrollbar,
wxWindow::GetScrollPos,
wxWindow::GetScrollThumb,
wxScrollBar, wxScrolledWindow
wxWindow::SetSize
virtual void SetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO)
virtual void SetSize(const wxRect& rect)
¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤È°ÌÃÖ¤ò¡¢¥Ô¥¯¥»¥ëñ°Ì¤Ç¥»¥Ã¥È¤¹¤ë
Sets the size and position of the window in pixels.
virtual void SetSize(int width, int height)
virtual void SetSize(const wxSize& size)
¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤ò¥Ô¥¯¥»¥ëñ°Ì¤Ç¥»¥Ã¥È¤¹¤ë
Sets the size of the window in pixels.
Parameters
x
¥Ô¥¯¥»¥ëñ°Ì¤Ç¤Î¾°ÌÃÖ¡¢¤Þ¤¿¤Ï¸½ºß¤ÎÃͤò»È¤¦¤³¤È¤ò¼¨¤¹ -1
Required x position in pixels, or -1 to indicate that the existing
value should be used.
y
¥Ô¥¯¥»¥ëñ°Ì¤Ç¤Î£Ù°ÌÃÖ¡¢¤Þ¤¿¤Ï¸½ºß¤ÎÃͤò»È¤¦¤³¤È¤ò¼¨¤¹ -1
Required y position in pixels, or -1 to indicate that the existing
value should be used.
width
¥Ô¥¯¥»¥ëñ°Ì¤Ç¤ÎÉý¡¢¤Þ¤¿¤Ï¸½ºß¤ÎÃͤò»È¤¦¤³¤È¤ò¼¨¤¹ -1
Required width in pixels, or -1 to indicate that the existing
value should be used.
height
¥Ô¥¯¥»¥ëñ°Ì¤Ç¤Î¹â¤µ¡¢¤Þ¤¿¤Ï¸½ºß¤ÎÃͤò»È¤¦¤³¤È¤ò¼¨¤¹ -1
Required height position in pixels, or -1 to indicate that the existing
value should be used.
size
rect
sizeFlags
¾¤Î°ú¿ô¤Î²ò¼á¤ò¼¨¤¹¡£¥Ó¥Ã¥È¥Õ¥é¥°¤Ï¼¡¤Î¤È¤ª¤ê:
wxSIZE_AUTO_WIDTH: -1 ¤Î width ¤Ï¡¢wxWidgets ¤¬Í¿¤¨¤ë¡¢
¥Ç¥Õ¥©¥ë¥È¤ÎÉý¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¤¿¤á¤Ë¡¢¤È¤é¤ì¤ë
wxSIZE_AUTO_HEIGHT: -1 ¤Î height ¤Ï¡¢wxWidgets ¤¬Í¿¤¨¤ë¡¢
¥Ç¥Õ¥©¥ë¥È¤Î¹â¤µ¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¤¿¤á¤Ë¡¢¤È¤é¤ì¤ë
wxSIZE_AUTO: -1 ¤Î size ¤Ï¡¢wxWidgets ¤¬Í¿¤¨¤ë¡¢
¥Ç¥Õ¥©¥ë¥È¤Î¥µ¥¤¥º¤Ç¤¢¤ë¤³¤È¤ò¼¨¤¹¤¿¤á¤Ë¡¢¤È¤é¤ì¤ë
wxSIZE_USE_EXISTING: -1 ¤ÎÃͤʤ顢¸½ºß¤Î¥µ¥¤¥º¤ò»È¤¦¤Ù¤¤Ç¤¢¤ë
wxSIZE_ALLOW_MINUS_ONE: -1 °Ê²¼¤Î¥µ¥¤¥º¤¬¡¢¥Ç¥Õ¥©¥ë¥È¤ÎÃͤǤϤʤ¯¡¢
¿¿¤ÎÃͤȤ·¤Æ²ò¼á¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë
Indicates the interpretation of other parameters. It is a bit list of the following:
wxSIZE_AUTO_WIDTH: a -1 width value is taken to indicate
a wxWidgets-supplied default width.
wxSIZE_AUTO_HEIGHT: a -1 height value is taken to indicate
a wxWidgets-supplied default width.
wxSIZE_AUTO: -1 size values are taken to indicate
a wxWidgets-supplied default size.
wxSIZE_USE_EXISTING: existing dimensions should be used
if -1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE: allow dimensions of -1 and less to be interpreted
as real dimensions, not default values.
Remarks
£²ÈÖÌܤνñ¤Êý¤Ï¡¢£±ÈÖÌܤνñ¤Êý¤ò¡¢¥Ç¥Õ¥©¥ë¥È¤Î£Ø¤È£Ù¤Î°ú¿ô¤Ç¸Æ¤Ö¤³¤È¤òÊØÍø¤Ë¤¹¤ë¡£
¤½¤·¤Æ¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¤Ê¤¤Éý¤È¹â¤µ¤Ç¡¢»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
£±ÈÖÌܤνñ¤Êý¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Î°ÌÃ֤ȡ¢¥ª¥×¥·¥ç¥ó¤Ç¤¢¤ë¥µ¥¤¥º¤òÀßÄꤹ¤ë¡£
wxWidgets ¤Ë¤è¤Ã¤Æ¡¢¥Ç¥Õ¥©¥ë¥ÈÃͤ¬Ä󶡤µ¤ì¤ë¤Ù¤¤«¡¢
¸½ºß¤Î¥µ¥¤¥º¤¬»È¤ï¤ì¤ë¤³¤È¤ò¼¨¤¹¤¿¤á¤Ë¡¢°ú¿ô¤Ï¡¢-1 ¤Ç¤â¤è¤¤¡£
The second form is a convenience for calling the first form with default
x and y parameters, and must be used with non-default width and height values.
The first form sets the position and optionally size, of the window.
Parameters may be -1 to indicate either that a default should be supplied
by wxWidgets, or that the current value of the dimension should be used.
See also
wxWindow::Move
wxPython note: ¥ª¡¼¥Ð¥í¡¼¥É¤µ¤ì¤¿¥á¥½¥Ã¥É̾¤ÎÂå¤ï¤ê¤Ë,
wxPython ¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ò»È¤¦:
wxPython note: In place of a single overloaded method name, wxPython
implements the following methods:
SetDimensions(x, y, width, height, sizeFlags=wxSIZE_AUTO)
|
|
SetSize(size)
|
|
SetPosition(point)
|
|
wxWindow::SetSizeHints
virtual void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1,
int incW=-1, int incH=-1)
¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ÎºÇ¾®¡¢ºÇÂç¡¢Áý²ÃÎ̤ò»ØÄꤹ¤ë¡£
ÃͤΥڥ¢¤¬¥»¥Ã¥È¤µ¤ì¤Ê¤¤¡Ê¤â¤·¤¯¤Ï-1¤ò¥»¥Ã¥È¤¹¤ë¡Ë¤Ê¤é¡¢¥Ç¥Õ¥©¥ë¥ÈÃͤ¬»È¤ï¤ì¤ë
Allows specification of minimum and maximum window sizes, and window size increments.
If a pair of values is not set (or set to -1), the default values will be used.
Parameters
minW
minH
maxW
maxH
incW
incH
Remarks
¤³¤Î´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¤È¡¢¥æ¡¼¥¶¤ÏÍ¿¤¨¤é¤ì¤¿¶³¦¤Î³°Â¦¤Ë¡¢
¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤ò¹ç¤ï¤»¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¤À¤í¤¦¡£
¥ê¥µ¥¤¥º¤ÎÁý²ÃÎ̤ϡ¢Motif ¤« Xt ²¼¤Ç¤Î¤ß°ÕÌ£¤òÀ®¤¹¡£
If this function is called, the user will not be able to size the window outside the
given bounds.
The resizing increments are only significant under Motif or Xt.
wxWindow::SetSizer
void SetSizer(wxSizer* sizer, bool deleteOld=TRUE)
¥¦¥£¥ó¥É¥¦¤¬¡¢Í¿¤¨¤é¤ì¤¿ layout sizer ¤ò»ý¤Ä¤è¤¦¤ËÀßÄꤹ¤ë¡£
¥¦¥£¥ó¥É¥¦¤Ï¡¢¤½¤Î¤È¤¤Ë¥ª¥Ö¥¸¥§¥¯¥È¤ò½êͤ·¤Æ¤ª¤ê¡¢¤½¤Î¥Ç¥ê¡¼¥È¤ò½èÍý¤¹¤ë¤À¤í¤¦¡£
¸½¾õ¤Î layout constraints ¥ª¥Ö¥¸¥§¥¯¥È¤¬¡¢¥¦¥£¥ó¥É¥¦¤Ë¤è¤Ã¤Æ´û¤Ë½êͤµ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
deleteOld ¤¬ TRUE ¤Ê¤é¡¢ºï½ü¤µ¤ì¤ë¤À¤í¤¦¡£
¥á¥â¡§¤³¤Î´Ø¿ô¤Ï¡¢sizer ¤¬ NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢TRUE ¤Ç¡¢
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢FALSE ¤ò»È¤Ã¤Æ¡¢°ÅÌÛŪ¤Ë SetAutoLayout
¤â¸Æ¤Ó½Ð¤¹¡£
Sets the window to have the given layout sizer. The window
will then own the object, and will take care of its deletion.
If an existing layout constraints object is already owned by the
window, it will be deleted if the deleteOld parameter is TRUE.
Note that this function will also call
SetAutoLayout implicitly with TRUE
parameter if the sizer is non-NULL and FALSE otherwise.
Parameters
sizer
ÀßÄꤹ¤ësizer¡£
¥¦¥£¥ó¥É¥¦¤Îsizer¤ò°ú¤Î¥¤·¡¢¾ò·ïÉդǥǥ꡼¥È¤¹¤ë¤¿¤á¤Ë¤Ï¡¢NULL ¤ò»ØÄꤷ¤Ê¤µ¤¤¡£
²¼¤ò¸«¤Æ¤¯¤ì¡£
The sizer to set. Pass NULL to disassociate and conditionally delete
the window's sizer. See below.
deleteOld
TRUE¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¤Ê¤é¡¢°ÊÁ°¤«¤é¸ºß¤¹¤ë¤¹¤Ù¤Æ¤Îsizer¤ò¥Ç¥ê¡¼¥È¤¹¤ë¤À¤í¤¦¡£
¼«Ê¬¤Ç¸Å¤¤sizer¤ò¥Ç¥ê¡¼¥È¤·¤¿¤¤¤Ê¤é¡¢FALSE¡£
If TRUE (the default), this will delete any prexisting sizer.
Pass FALSE if you wish to handle deleting the old sizer yourself.
Remarks
SetSizer ¤Ï¡¢¸½ºß¼«Æ°Åª¤Ë Layout ¤ò͸ú¤ä̵¸ú¤Ë¤¹¤ë¡£
¤·¤«¤·¡¢wxWidgets 2.3.3 °ÊÁ°¤Ç¤Ï°Ê²¼¤ÎÊýË¡¤¬»ÈÍѤµ¤ì¤ë¡£
OnSize ¤Ç¡¢¼«Æ°Åª¤Ësizer¤ò»È¤¦¤³¤È¤ò¥¦¥£¥ó¥É¥¦¤ËÃΤ餻¤ë¤¿¤á¤Ë¡¢
wxWindow::SetAutoLayout ¤ò¸Æ¤Ð¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢OnSize ¤ò¥ª¡¼¥Ð¥é¥¤¥É¤·¤Æ¡¢ÌÀ¼¨Åª¤Ë Layout() ¤ò¸Æ¤Ð¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
wxSizer ¤È wxLayoutConstraints ¤ÎξÊý¤òÀßÄꤹ¤ë¾ì¹ç¡¢
sizer¤À¤±¤¬¸ú²Ì¤¬¤¢¤ë¡£
SetSizer now enables and disables Layout automatically, but prior to wxWidgets 2.3.3
the following applied:
You must call wxWindow::SetAutoLayout to tell a window to use
the sizer automatically in OnSize; otherwise, you must override OnSize and call Layout()
explicitly. When setting both a wxSizer and a wxLayoutConstraints,
only the sizer will have effect.
wxWindow::SetSizerAndFit
void SetSizerAndFit(wxSizer* sizer, bool deleteOld=TRUE)
sizer¤ÎºÇ¾®¥µ¥¤¥º¤Ë¥¦¥£¥ó¥É¥¦¤ò¹ç¤ï¤»¤ë¤¿¤á¤Ë¡¢size hints ¤òÀßÄꤹ¤ë¤³¤È¤ò½ü¤¤¤Æ¡¢
SetSizer ¤ÈƱ¤¸¤Ç¤¢¤ë¡£
The same as
SetSizer, except it also sets the size hints
for the window based on the sizer's minimum size.
wxWindow::SetTitle
virtual void SetTitle(const wxString& title)
¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë¤òÀßÄꤹ¤ë¡£
¥Õ¥ì¡¼¥à¤È¥À¥¤¥¢¥í¥°¤À¤±¤ËŬÍѤǤ¤ë¡£
Sets the window's title. Applicable only to frames and dialogs.
Parameters
title
¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë¡£
The window's title.
See also
wxWindow::GetTitle
wxWindow::SetThemeEnabled
virtual void SetThemeEnabled(bool enable)
¥¦¥£¥ó¥É¥¦¤ÎÇØ·Ê¤òÉÁ¤¯¤Î¤Ë¡¢ÇطʤÎÉÁ²è¥³¡¼¥É¤ÎÂå¤ï¤ê¤Ë¡¢
¥·¥¹¥Æ¥à¤Î "theme" ¤ò»È¤¦¤Ù¤¤Ê¤é¡¢¤³¤Î´Ø¿ô¤Ï¡¢¥¦¥£¥ó¥É¥¦¤ËÅÁ¤¨¤ë¡£
ÌÀ¤é¤«¤Ë¡¢¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ï¡¢¥æ¡¼¥¶ÄêµÁ¤Î¥¦¥£¥ó¥É¥¦¤Ë¡¢
the notion of themes ¤ò¥µ¥Ý¡¼¥È¤¹¤ëɬÍפ¬¤¢¤ë¤Î¤Ç¡¢
¤³¤ì¤Ï¡¢¾ï¤Ë¸ú²Ì¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£
£±¤Ä¤Î¤½¤Î¤è¤¦¤Ê¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ï¡¢GTK+ ¤Ç¤¢¤ë¡£
¤½¤³¤Ç¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Ï¡¢¥æ¡¼¥¶¤¬ÁªÂò¤·¤¿¥Æ¡¼¥Þ¤Ë¤è¤Ã¤Æ¡¢
ÄêµÁ¤µ¤ì¤¿¡Ê¤È¤Æ¤â¿ºÌ¤Ê¡ËÇØ·Ê¤ò»ý¤Ä¤³¤È¤¬¤Ç¤¤ë¡£
¥À¥¤¥¢¥í¥°¡¢notebook pages¡¢¤½¤·¤Æ¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼¤Ï¡¢
¥Ç¥Õ¥©¥ë¥È¤Ç¡¢TRUE ¤ËÀßÄꤵ¤ì¤¿¥Õ¥é¥°¤ò»ý¤Ä¡£
¤À¤«¤é¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥ë¥Ã¥¯¡õ¥Õ¥£¡¼¥ë¤ÏºÇŬ¤Ë¥·¥ß¥å¥ì¡¼¥È¤µ¤ì¤ë¡£
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. This does not always have any effect since the underlying platform
obviously needs to support the notion of themes in user defined windows.
One such platform is GTK+ where windows can have (very colourful) backgrounds
defined by a user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to TRUE
by default so that the default look and feel is simulated best.
wxWindow::SetValidator
virtual void SetValidator(const wxValidator& validator)
¸½ºß¤Î¥Ð¥ê¥Ç¡¼¥¿¡Ê¤â¤·¤¢¤ì¤Ð¡Ë¤ò¥Ç¥ê¡¼¥È¤·¡¢¤³¤Î¥¿¥¤¥×¤Î¿·¤·¤¤¥Ð¥ê¥Ç¡¼¥¿¤òºîÀ®¤¹¤ë¤¿¤á¤Ë¡¢
wxValidator::Clone ¤ò¸Æ¤Ö¤³¤È¤Ç¡¢¥¦¥£¥ó¥É¥¦¥Ð¥ê¥Ç¡¼¥¿¤òÀßÄꤹ¤ë¡£
Deletes the current validator (if any) and sets the window validator, having called wxValidator::Clone to
create a new validator of this type.
wxWindow::SetToolTip
void SetToolTip(const wxString& tip)
void SetToolTip(wxToolTip* tip)
¥¦¥£¥ó¥É¥¦¤Ë¥Ä¡¼¥ë¥Á¥Ã¥×¤ò¼è¤êÉÕ¤±¤ë¡£
Attach a tooltip to the window.
See also: GetToolTip,
wxToolTip
wxWindow::GetToolTip
wxToolTip* GetToolTip() const
¼è¤êÉÕ¤±¤é¤ì¤¿¥Ä¡¼¥ë¥Á¥Ã¥×¤òÆÀ¤ë¡£
²¿¤â¤Ê¤¤¤Ê¤é¡¢NULL¡£
Get the associated tooltip or NULL if none.
wxWindow::SetVirtualSize
void SetVirtualSize(int width, int height)
void SetVirtualSize(const wxSize& size)
¥Ô¥¯¥»¥ëñ°Ì¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î²¾ÁÛ¥µ¥¤¥º¤òÀßÄꤹ¤ë¡£
Sets the virtual size of the window in pixels.
wxWindow::SetVirtualSizeHints
virtual void SetVirtualSizeHints(int minW,int minH, int maxW=-1, int maxH=-1)
²¾ÁۤΥ¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ÎºÇ¾®¡¢ºÇÂç¤òÀßÄꤹ¤ë¡£
ÃͤΥڥ¢¤¬¥»¥Ã¥È¤µ¤ì¤Ê¤¤¡Ê¤â¤·¤¯¤Ï-1¤ò¥»¥Ã¥È¤¹¤ë¡Ë¤Ê¤é¡¢¥Ç¥Õ¥©¥ë¥ÈÃͤ¬»È¤ï¤ì¤ë
Allows specification of minimum and maximum virtual window sizes.
If a pair of values is not set (or set to -1), the default values
will be used.
Parameters
minW
minH
maxW
maxH
Remarks
¤³¤Î´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¤È¡¢¥æ¡¼¥¶¤ÏÍ¿¤¨¤é¤ì¤¿¶³¦¤Î³°Â¦¤Ë¡¢
¥¦¥£¥ó¥É¥¦¤Î²¾ÁÛ¥µ¥¤¥º¤ò¹ç¤ï¤»¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¤À¤í¤¦¡£
If this function is called, the user will not be able to size the virtual area
of the window outside the given bounds.
wxWindow::SetWindowStyle
void SetWindowStyle(long style)
wxWindow::SetWindowStyleFlag
virtual void SetWindowStyleFlag(long style)
¥¦¥£¥ó¥É¥¦¤Î¥¹¥¿¥¤¥ë¤òÀßÄꤹ¤ë¡£
¤¤¤¯¤Ä¤«¤Î¥¹¥¿¥¤¥ë¤Ï¡¢¥¦¥£¥ó¥É¥¦¤ÎºîÀ®¸å¤ËÊѤ¨¤é¤ì¤Ê¤¤»ö¤È¡¢
¤½¤Î¤Û¤«¤òÊѹ¹¸å¡¢¤¹¤°¤ËÊѹ¹¤µ¤ì¤ë¤è¤¦¤Ë¡¢
Refresh() ¤¬¸Æ¤Ð¤ì¤ë¤³¤È¤ËÃí°Õ¡£
¥Õ¥é¥°¤Ë¤Ä¤¤¤Æ¤Î¤è¤ê¿¤¯¤Î¾ðÊó¤Ï Window styles ¤ò¸«¤Æ¤¯¤ì¡£
Sets the style of the window. Please note that some styles cannot be changed
after the window creation and that
Refresh() might
be called after changing the others for the change to take place immediately.
See Window styles for more information about flags.
See also
GetWindowStyleFlag
wxWindow::Show
virtual bool Show(bool show = TRUE)
¥¦¥£¥ó¥É¥¦¤òɽ¼¨¤¹¤ë¤«¡¢±£¤¹¡£
¤â¤·¡¢¥È¥Ã¥×¤Ë»ý¤Ã¤Æ¤¤¿¤¤¤Ê¤é¡¢¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦¤Î¤¿¤á¤Ë
Raise ¤ò¸Æ¤ÖɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
¤À¤±¤É¡¢¥Õ¥ì¡¼¥à¤ÎºîÀ®¸å¡¢¤¹¤°¤Ë Show() ¤¬¸Æ¤Ð¤ì¤ë¤Ê¤é¡¢¤³¤ì¤ÏɬÍפʤ¤¡£
Shows or hides the window. You may need to call
Raise
for a top level window if you want to bring it to top, although this is not
needed if Show() is called immediately after the frame creation.
Parameters
show
¤â¤· TRUE ¤Ê¤é¡¢¥¦¥£¥ó¥É¥¦¤òɽ¼¨¤¹¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð±£¤¹¡£
If TRUE displays the window. Otherwise, hides it.
Return value
ɽ¼¨¤µ¤ì¤ë¤«¡¢±£¤µ¤ì¤¿¤Ê¤é TRUE¡£
¤¹¤Ç¤ËÍ׵ᤵ¤ì¤¿¾õÂ֤ǡ¢²¿¤â¤µ¤ì¤Ê¤«¤Ã¤¿¤é FALSE¡£
TRUE if the window has been shown or hidden or
FALSE if nothing was
done because it already was in the requested state.
See also
wxWindow::IsShown
wxWindow::Thaw
virtual void Thaw()
°ÊÁ°¡¢
Freeze ¤¬¸Æ¤Ð¤ì¤¿¸å¤Ç¡¢
¥¦¥£¥ó¥É¥¦¤Î¥¢¥Ã¥×¥Ç¡¼¥È¤òºÆ¤Ó²Äǽ¤Ë¤¹¤ë¡£
Reenables window updating after a previous call to
Freeze.
wxWindow::TransferDataFromWindow
virtual bool TransferDataFromWindow()
»Ò¤Î¥³¥ó¥È¥í¡¼¥ë¤«¤é»ØÄꤵ¤ì¤¿¥Ç¡¼¥¿ÎÎ°è¤Ø¡¢¤½¤ì¤é¤Î¥Ð¥ê¥Ç¡¼¥¿¤Ë¤è¤Ã¤Æ¡¢°Ü¤¹¡£
¼ºÇÔ¤¹¤ì¤Ð¡¢
FALSE ¤òÊÖ¤¹¡£
¥¦¥£¥ó¥É¥¦¤Ë¡¢wxWS_EX_VALIDATE_RECURSIVELY ¤Î³ÈÄ¥¥¹¥¿¥¤¥ë¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤Ê¤é¡¢
¤¹¤Ù¤Æ¤Î»Ò¥¦¥£¥ó¥É¥¦¤Î TransferDataFromWindow() ¤â¸Æ¤Ö¡£
Transfers values from child controls to data areas specified by their validators. Returns
FALSE if a transfer failed.
If the window has wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call TransferDataFromWindow() of all child windows.
See also
wxWindow::TransferDataToWindow,
wxValidator, wxWindow::Validate
wxWindow::TransferDataToWindow
virtual bool TransferDataToWindow()
»ØÄꤵ¤ì¤¿¥Ç¡¼¥¿Îΰ褫¤é»Ò¤Î¥³¥ó¥È¥í¡¼¥ë¤Ø¡¢¤½¤ì¤é¤Î¥Ð¥ê¥Ç¡¼¥¿¤Ë¤è¤Ã¤Æ¡¢°Ü¤¹¡£
¥¦¥£¥ó¥É¥¦¤Ë¡¢wxWS_EX_VALIDATE_RECURSIVELY ¤Î³ÈÄ¥¥¹¥¿¥¤¥ë¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤Ê¤é¡¢
¤¹¤Ù¤Æ¤Î»Ò¥¦¥£¥ó¥É¥¦¤Î TransferDataToWindow() ¤â¸Æ¤Ö¡£
Transfers values to child controls from data areas specified by their validators.
If the window has wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call TransferDataToWindow() of all child windows.
Return value
žÁ÷¤¬¼ºÇÔ¤¹¤ì¤Ð¡¢FALSE¡£
Returns
FALSE if a transfer failed.
See also
wxWindow::TransferDataFromWindow,
wxValidator, wxWindow::Validate
wxWindow::Update
virtual void Update()
¤³¤Î¥á¥½¥Ã¥É¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Î̵¸ú¤Ë¤Ê¤Ã¤¿Îΰè¤òľ¤Á¤ËºÆÉÁ²è¤¹¤ë¡£
¤¿¤¤¤Æ¤¤¤Ï¡¢À©¸æ¥Õ¥í¡¼¤¬¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ËÌá¤Ã¤¿¤È¤¤ËȯÀ¸¤¹¤ë¡£
¤³¤Î´Ø¿ô¤Ï¡¢¥¦¥£¥ó¥É¥¦¤¬´û¤ËºÆÉÁ²è¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢¥ê¥Õ¥ì¥Ã¥·¥å¤â²¿¤â¤·¤Ê¤¤¤³¤È¤ËÃí°Õ¡£
̵¾ò·ï¤Ë¥¦¥£¥ó¥É¥¦¤ò¤¹¤°¤ËÉÁ²è¤·¤¿¤¤¤Ê¤é¡¢¤Ï¤¸¤á¤Ë
Refresh ¤ò¸Æ¤ó¤Ç¤¯¤ì¡£
Calling this method immediately repaints the invalidated area of the window
while this would usually only happen when the flow of control returns to the
event loop. Notice that this function doesn't refresh the window and does
nothing if the window hadn't been already repainted. Use
Refresh first if you want to immediately redraw the
window unconditionally.
wxWindow::Validate
virtual bool Validate()
¸½ºß¤Î»Ò¤Î¥³¥ó¥È¥í¡¼¥ë¤ÎÃͤò¡¢¤½¤ì¤é¤Î validator ¤ò»È¤Ã¤Æ¥Ð¥ê¥Ç¡¼¥È¤¹¤ë¡£
¥¦¥£¥ó¥É¥¦¤¬ wxWS_EX_VALIDATE_RECURSIVELY ¤Î³ÈÄ¥¥Õ¥é¥°¤òÀßÄꤵ¤ì¤Æ¤¤¤ë¤Ê¤é¡¢
¤¹¤Ù¤Æ¤Î»Ò¥¦¥£¥ó¥É¥¦¤Î Validate() ¤â¸Æ¤Ö¡£
Validates the current values of the child controls using their validators.
If the window has wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call Validate() of all child windows.
Return value
¤¤¤º¤ì¤«¤Î validations ¤¬¼ºÇÔ¤¹¤ì¤Ð¡¢FALSE¡£
Returns
FALSE if any of the validations failed.
See also
wxWindow::TransferDataFromWindow,
wxWindow::TransferDataFromWindow,
wxValidator
wxWindow::WarpPointer
void WarpPointer(int x, int y)
¥¦¥£¥ó¥É¥¦¤ÎÍ¿¤¨¤é¤ì¤¿°ÌÃ֤ء¢¥Ý¥¤¥ó¥¿¤òư¤«¤¹¡£
Moves the pointer to the given position on the window.
Parameters
x
y
¸í¡§wxDEFAULT_FRAME_STYLE & (wxMINIMIZE_BOX | wxMAXIMIZE_BOX)