Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ##### main.cpp on Mar 13, 2011
- // ##### Used for X11 01
- // ##### Created by WeltEnSTurm
- #include "include/window.hpp"
- class DerivedWindow : public wm::window {
- public:
- DerivedWindow(int x, int y, int w, int h, std::string name) : window(x,y,w,h,name){}
- void OnMouseButton(MOUSE_BUTTON button, bool state){
- std::cout<<"Mouse Button "<<button<<" in window number "<<mIdentifier<<" has been "<<(state?"pressed":"released")<<"!"<<std::endl;
- }
- void OnClose(){
- Hide();
- }
- void KeyboardPress(KEYBOARD_KEY key, bool pressed){
- std::cout<<"Key "<<(char)key<<" ("<<key<<") has been "<<(pressed?"pressed":"released")<<"!"<<std::endl;
- }
- };
- int main(int argc, char ** argv){
- DerivedWindow Window(50,50,200,200,"The Cake Is A Lie!");
- DerivedWindow Window2(50,300,250,250,"YOU ARE A LIE!");
- return wm::Main();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement