- // Does this window want to accept keyboard focus?
- virtual bool AcceptsFocus() const;
-
-public:
- ////////////////////////////////////////////////////////////////////////
- //// IMPLEMENTATION
-
- // For implementation purposes - sometimes decorations make the client area
- // smaller
- virtual wxPoint GetClientAreaOrigin() const;
-
- // Makes an adjustment to the window position (for example, a frame that has
- // a toolbar that it manages itself).
- virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
-
- // Windows subclassing
- void SubclassWin(WXHWND hWnd);
- void UnsubclassWin(void);
- virtual long Default(void);
- virtual bool MSWCommand(WXUINT param, WXWORD id);
- virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam);
- virtual wxWindow *FindItem(int id) const;
- virtual wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const ;
- virtual void PreDelete(WXHDC dc); // Allows system cleanup
- // TO DO: how many of these need to be virtual?
- virtual WXHWND GetHWND(void) const ;
- virtual void SetHWND(WXHWND hWnd);
-
- // Make a Windows extended style from the given wxWindows window style
- virtual WXDWORD MakeExtendedStyle(long style, bool eliminateBorders = TRUE);
- // Determine whether 3D effects are wanted
- virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D);
-
- virtual void AddChild(wxWindow *child); // Adds reference to the child object
- virtual void RemoveChild(wxWindow *child); // Removes reference to child
- // (but doesn't delete the child object)
- virtual void DestroyChildren(void); // Removes and destroys all children
-
- inline bool IsBeingDeleted(void);
-
- // MSW only: TRUE if this control is part of the main control
- virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
-
- // Constraint implementation
- void UnsetConstraints(wxLayoutConstraints *c);
- inline wxList *GetConstraintsInvolvedIn(void) const ;
- // Back-pointer to other windows we're involved with, so if we delete
- // this window, we must delete any constraints we're involved with.
- void AddConstraintReference(wxWindow *otherWin);
- void RemoveConstraintReference(wxWindow *otherWin);
- void DeleteRelatedConstraints(void);
-
- virtual void ResetConstraints(void);
- virtual void SetConstraintSizes(bool recurse = TRUE);
- virtual bool LayoutPhase1(int *noChanges);
- virtual bool LayoutPhase2(int *noChanges);
- virtual bool DoPhase(int);
- // Transforms from sizer coordinate space to actual
- // parent coordinate space
- virtual void TransformSizerToActual(int *x, int *y) const ;
-
- // Set size with transformation to actual coordinates if nec.
- virtual void SizerSetSize(int x, int y, int w, int h);
- virtual void SizerMove(int x, int y);
-
- // Only set/get the size/position of the constraint (if any)
- virtual void SetSizeConstraint(int x, int y, int w, int h);
- virtual void MoveConstraint(int x, int y);
- virtual void GetSizeConstraint(int *w, int *h) const ;
- virtual void GetClientSizeConstraint(int *w, int *h) const ;
- virtual void GetPositionConstraint(int *x, int *y) const ;
-
- wxObject *GetChild(int number) const ;
-
- void MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title,
- int x, int y, int width, int height,
- WXDWORD style, const char *dialog_template = NULL,
- WXDWORD exendedStyle = 0);
-
- // Actually defined in wx_canvs.cc since requires wxCanvas declaration
- virtual void MSWDeviceToLogical(float *x, float *y) const ;
-
- // Create an appropriate wxWindow from a HWND
- virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
-
- // Make sure the window style reflects the HWND style (roughly)
- virtual void AdoptAttributesFromHWND(void);
-
- // Setup background and foreground colours correctly
- virtual void SetupColours(void);
-
- // Handlers
- virtual void MSWOnCreate(WXLPCREATESTRUCT cs);
- virtual bool MSWOnPaint(void);
- virtual WXHICON MSWOnQueryDragIcon(void) { return 0; }
- virtual void MSWOnSize(int x, int y, WXUINT flag);
- virtual void MSWOnWindowPosChanging(void *lpPos);
- virtual void MSWOnHScroll(WXWORD nSBCode, WXWORD pos, WXHWND control);
- virtual void MSWOnVScroll(WXWORD nSBCode, WXWORD pos, WXHWND control);
- virtual bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control);
- virtual long MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam);
- virtual bool MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam);
- virtual WXHBRUSH MSWOnCtlColor(WXHDC dc, WXHWND pWnd, WXUINT nCtlColor,
- WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
- virtual bool MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
- virtual bool MSWOnEraseBkgnd(WXHDC pDC);
- virtual void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu);
- virtual void MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem);
- virtual bool MSWOnClose(void);
- virtual bool MSWOnDestroy(void);
- virtual bool MSWOnSetFocus(WXHWND wnd);
- virtual bool MSWOnKillFocus(WXHWND wnd);
- virtual void MSWOnDropFiles(WXWPARAM wParam);
- virtual bool MSWOnInitDialog(WXHWND hWndFocus);
- virtual void MSWOnShow(bool show, int status);
-
- // TODO: rationalise these functions into 1 or 2 which take the
- // event type as argument.
- virtual void MSWOnLButtonDown(int x, int y, WXUINT flags);
- virtual void MSWOnLButtonUp(int x, int y, WXUINT flags);
- virtual void MSWOnLButtonDClick(int x, int y, WXUINT flags);
-
- virtual void MSWOnMButtonDown(int x, int y, WXUINT flags);
- virtual void MSWOnMButtonUp(int x, int y, WXUINT flags);
- virtual void MSWOnMButtonDClick(int x, int y, WXUINT flags);
-
- virtual void MSWOnRButtonDown(int x, int y, WXUINT flags);
- virtual void MSWOnRButtonUp(int x, int y, WXUINT flags);
- virtual void MSWOnRButtonDClick(int x, int y, WXUINT flags);
-
- virtual void MSWOnMouseMove(int x, int y, WXUINT flags);
- virtual void MSWOnMouseEnter(int x, int y, WXUINT flags);
- virtual void MSWOnMouseLeave(int x, int y, WXUINT flags);
-
- virtual void MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
-
- virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate);
- virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate);
-
- virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item);
- virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item);
-
- virtual void MSWOnJoyDown(int joystick, int x, int y, WXUINT flags);
- virtual void MSWOnJoyUp(int joystick, int x, int y, WXUINT flags);
- virtual void MSWOnJoyMove(int joystick, int x, int y, WXUINT flags);
- virtual void MSWOnJoyZMove(int joystick, int z, WXUINT flags);
-
- virtual long MSWGetDlgCode();
-
- // Window procedure
- virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
-
- // Calls an appropriate default window procedure
- virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
- virtual bool MSWProcessMessage(WXMSG* pMsg);
- virtual void MSWDestroyWindow(void);
-
- // Detach "Window" menu from menu bar so it doesn't get deleted
- void MSWDetachWindowMenu(void);
-
- inline WXFARPROC MSWGetOldWndProc() const;
- inline void MSWSetOldWndProc(WXFARPROC proc);
-
- // Define for each class of dialog and control
- virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
- WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
-
- inline void SetShowing(bool show);
- inline bool IsUserEnabled(void) const;
- inline bool GetUseCtl3D(void) const ;
- inline bool GetTransparentBackground(void) const ;
-
- // Responds to colour changes: passes event on to children.
- void OnSysColourChanged(wxSysColourChangedEvent& event);
-
- // Transfers data to any child controls
- void OnInitDialog(wxInitDialogEvent& event);
-
- // Sends an OnInitDialog event, which in turns transfers data to
- // to the window via validators.
- virtual void InitDialog(void);
-
- ////////////////////////////////////////////////////////////////////////
- //// PROTECTED DATA