More Motif stuff, minor stubs correction

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-20 07:35:20 +00:00
parent a5e0e655cb
commit 02e8b2f9fb
17 changed files with 834 additions and 89 deletions

View File

@@ -42,10 +42,7 @@ class WXDLLEXPORT wxButton: public wxControl
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetDefault();
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel() const ;
virtual void Command(wxCommandEvent& event);
};

View File

@@ -44,8 +44,6 @@ class WXDLLEXPORT wxCheckBox: public wxControl
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue() const ;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetLabel(const wxString& label);
virtual void Command(wxCommandEvent& event);
};

View File

@@ -28,6 +28,20 @@ extern char * wxFindAccelerator (char *s);
extern XmString wxFindAcceleratorText (char *s);
extern int wxCharCodeXToWX(KeySym keySym);
extern KeySym wxCharCodeWXToX(int id);
bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Widget widget, XEvent *xevent);
bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Widget widget, XEvent *xevent);
#define wxNO_COLORS 0x00
#define wxBACK_COLORS 0x01
#define wxFORE_COLORS 0x02
extern XColor itemColors[5] ;
#define wxBACK_INDEX 0
#define wxFORE_INDEX 1
#define wxSELE_INDEX 2
#define wxTOPS_INDEX 3
#define wxBOTS_INDEX 4
#endif
// _WX_PRIVATE_H_

View File

@@ -43,10 +43,6 @@ class WXDLLEXPORT wxStaticText: public wxControl
long style = 0,
const wxString& name = wxStaticTextNameStr);
// accessors
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
void SetLabel(const wxString&);
// operations
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};

View File

@@ -78,7 +78,6 @@ public:
// operations
// ----------
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
// Clipboard operations
virtual void Copy();
@@ -122,16 +121,23 @@ public:
// callbacks
// ---------
void OnDropFiles(wxDropFilesEvent& event);
// void OnChar(wxKeyEvent& event); // Process 'enter' if required
void OnChar(wxKeyEvent& event);
// void OnEraseBackground(wxEraseEvent& event);
// Implementation
// --------------
virtual void Command(wxCommandEvent& event);
//// Motif-specific
inline void SetModified(bool mod) { m_modified = mod; }
virtual WXWidget GetTopWidget() const;
protected:
wxString m_fileName;
public:
// Motif-specific
void* m_tempCallbackStruct;
bool m_modified;
DECLARE_EVENT_TABLE()
};

View File

@@ -283,6 +283,9 @@ public:
inline void SetWindowStyleFlag(long flag);
inline long GetWindowStyleFlag() const;
// Handle a control command
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
// Set/get event handler
inline void SetEventHandler(wxEvtHandler *handler);
inline wxEvtHandler *GetEventHandler() const;
@@ -460,17 +463,32 @@ public:
// message, e.g. arrange status bar, toolbar etc.
virtual bool PreResize() { return TRUE; }
// Get main widget for this window
// Get main widget for this window, e.g. a text widget
virtual WXWidget GetMainWidget() const;
// Get the client widget for this window (something we can
// create other windows on)
virtual WXWidget GetClientWidget() const;
// Get the top widget for this window, e.g. the scrolled widget parent
// of a multi-line text widget. Top means, top in the window hierarchy
// that implements this window.
virtual WXWidget GetTopWidget() const;
virtual void SetMainWidget(WXWidget w) { m_mainWidget = w; }
bool CanAddEventHandler() const { return m_canAddEventHandler; }
void SetCanAddEventHandler(bool flag) { m_canAddEventHandler = flag; }
// Get the underlying X window and display
virtual WXWindow GetXWindow() const;
virtual WXDisplay *GetXDisplay() const;
// Change properties
virtual void ChangeColour(WXWidget widget);
virtual void ChangeFont(WXWidget widget);
// Adds the widget to the hash table and adds event handlers.
bool AttachWidget (wxWindow* parent, WXWidget mainWidget,
WXWidget formWidget, int x, int y, int width, int height);
bool DetachWidget(WXWidget widget);
// Generates a paint event
virtual void DoPaint();
@@ -520,6 +538,7 @@ public:
public:
/// Motif-specific
bool m_canAddEventHandler;
bool m_button1Pressed;
bool m_button2Pressed;
bool m_button3Pressed;

View File

@@ -295,7 +295,7 @@ public:
inline bool GetDoubleClick(void) const;
inline void AllowDoubleClick(bool value) { SetDoubleClick(value); }
// Old way to handle a control command
// Handle a control command
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
// Set/get event handler

View File

@@ -283,6 +283,9 @@ public:
inline void SetWindowStyleFlag(long flag);
inline long GetWindowStyleFlag() const;
// Handle a control command
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
// Set/get event handler
inline void SetEventHandler(wxEvtHandler *handler);
inline wxEvtHandler *GetEventHandler() const;