equal
deleted
inserted
replaced
379 return m_list.end(); |
379 return m_list.end(); |
380 } |
380 } |
381 |
381 |
382 }; |
382 }; |
383 |
383 |
384 struct BaseWindow : public gui::CompositeWidget { |
384 struct BaseWindow : public gui::Panel { |
385 public: |
385 public: |
386 typedef gui::CompositeWidget super; |
386 typedef gui::Panel super; |
387 |
387 |
388 static WindowList s_list; |
388 static WindowList s_list; |
389 |
389 |
390 ZeroInitBegin m_zero_init_area; ///< following members get cleared by constructor |
390 ZeroInitBegin m_zero_init_area; ///< following members get cleared by constructor |
391 |
391 |
419 |
419 |
420 ZeroInitEnd m_zero_init_end; ///< end of zero initialization area |
420 ZeroInitEnd m_zero_init_end; ///< end of zero initialization area |
421 |
421 |
422 protected: |
422 protected: |
423 BaseWindow(WindowClass cls, StringID caption_text = 0, byte color = COLOUR_GREY, gui::FeatureFlags feature_flags = gui::FF_NONE) |
423 BaseWindow(WindowClass cls, StringID caption_text = 0, byte color = COLOUR_GREY, gui::FeatureFlags feature_flags = gui::FF_NONE) |
424 : CompositeWidget(NULL, 0, feature_flags, color, Rect16(), 0) |
424 : super(NULL, feature_flags, 0, color) |
425 , m_zero_init_area(m_zero_init_end) |
425 , m_zero_init_area(m_zero_init_end) |
426 , window_class(cls) |
426 , window_class(cls) |
427 , m_caption_text(caption_text) |
427 , m_caption_text(caption_text) |
428 {} |
428 {} |
429 |
429 |
455 virtual bool Create(const WindowDesc *desc, WindowNumber num = 0); |
455 virtual bool Create(const WindowDesc *desc, WindowNumber num = 0); |
456 |
456 |
457 /*virtual*/ void CreateNcWidgets(); |
457 /*virtual*/ void CreateNcWidgets(); |
458 /*virtual*/ void CreateWidgets(); ///< @TODO remove it when old gui infrastructure will no longer be used |
458 /*virtual*/ void CreateWidgets(); ///< @TODO remove it when old gui infrastructure will no longer be used |
459 |
459 |
|
460 /*virtual*/ void OnCreate(gui::EvtCreate &ev); |
460 /*virtual*/ void OnPaint(gui::EvtPaint &ev); |
461 /*virtual*/ void OnPaint(gui::EvtPaint &ev); |
|
462 /*virtual*/ void OnResize(gui::EvtResize &ev); |
461 |
463 |
462 |
464 |
463 static BaseWindow* Allocate(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const OldWidget *widget); |
465 static BaseWindow* Allocate(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const OldWidget *widget); |
464 static BaseWindow* Allocate(const WindowDesc *desc, int window_number = 0); |
466 static BaseWindow* Allocate(const WindowDesc *desc, int window_number = 0); |
465 static BaseWindow* AllocateFront(const WindowDesc *desc, int window_number = 0); |
467 static BaseWindow* AllocateFront(const WindowDesc *desc, int window_number = 0); |