(Mo)use(Sen)sitive(Pic)ture(But)ton

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
emarti
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 210
Joined: Sat May 07, 2005 8:24 pm
Location: Eskisehir, TURKEY
Contact:

(Mo)use(Sen)sitive(Pic)ture(But)ton

Post by emarti » Thu Apr 13, 2006 10:15 pm

Code: Select all

#ifndef WXMOSENPICBUT_H
#define WXMOSENPICBUT_H

class wxMosenpicButton : public wxButton 
{ 
public: 
        wxMosenpicButton(wxWindow *parent, wxWindowID id, int x, int y, 
			const  wxBitmap* normalbitmap, const  wxBitmap* overbitmap, const  wxBitmap* clickbitmap); 
        virtual ~wxMosenpicButton(); 
		
        void In(wxMouseEvent& event); 
        void Out(wxMouseEvent& event); 
        void Clicked(wxMouseEvent& event); 
        void OnPaint(wxPaintEvent& event); 

private: 
        wxBitmap* m_bitmap; 
        wxBitmap* m_normalbitmap;
        wxBitmap* m_overbitmap;
        wxBitmap* m_clickbitmap; 
        wxSize m_size; 
		
        DECLARE_EVENT_TABLE() 
}; 

#endif
Download sample & class.
I'll be waiting for your advice.
http://emarti.50webs.com/wxMosenpic.zip
- T U R K E Y ?
- I love this country!

WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Wed Apr 19, 2006 3:53 pm

In my opinion:
Maybe you should use camel notation on the class name, or write out the class name in its entirety wxMouseSensitive(Picture||Image)Button, its long but more descriptive than wxMosenpicButton.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

emarti
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 210
Joined: Sat May 07, 2005 8:24 pm
Location: Eskisehir, TURKEY
Contact:

Post by emarti » Thu Apr 20, 2006 8:57 pm

Thanks :idea: , I take into consideration your opinion while coding another class.
- T U R K E Y ?
- I love this country!

WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/

Post Reply