Search found 4 matches

by oarzu
Wed Apr 22, 2009 4:36 pm
Forum: C++ Development
Topic: Connect two events to one derived class
Replies: 3
Views: 536

The instance of mcuFrame is the object that is using the rtnSWTICH class. My mcuFrame class has multiply instances of rtnSWITCH. I want each instance to be connected to the left-click event and perform the same operation to that instance. Easily done by adding the first Connect statement. Now in the...
by oarzu
Thu Apr 16, 2009 8:10 pm
Forum: C++ Development
Topic: Connect two events to one derived class
Replies: 3
Views: 536

Connect two events to one derived class

I have a class rtnSWITCH that is derived from the wxSlider class. In rtnSWITCH i've connected two events to the class. Connect(id, wxEVT_LEFT_DOWN, wxMouseEventHandler(rtnSWITCH::OnLeftClick)); Connect(id, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEventHandler(mcuFrame::OnLaser)); The second eventhandl...
by oarzu
Fri Mar 20, 2009 7:00 pm
Forum: C++ Development
Topic: Creating a wxStaticBitmap within a class constructor
Replies: 3
Views: 675

The code i posted is housed inside the saviLED class definition. A class constructor is a function inside the class with the same name as the class. This particular constructor takes two int arguments. Here's the entire class difinition. class saviLED{ public: int GetState(); void SetState(int new_s...
by oarzu
Fri Mar 20, 2009 5:05 pm
Forum: C++ Development
Topic: Creating a wxStaticBitmap within a class constructor
Replies: 3
Views: 675

Creating a wxStaticBitmap within a class constructor

I have a class myframe that has a wxPanel* called panel. "panel" is where i put all my controls and such. I currently have many wxStaticBitmaps created on "panel" that represent LEDs. Instead of manually creating every LED i want to create a class within myframe called sLED that will create a wxStat...