1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/* i_modelview.cpp
*
* Copyright (c) 1994-1996, Marko Macek
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
*/
#include "i_modelview.h"
#include "o_routine.h"
//#include <stdio.h>
ExModelView::ExModelView(EView *AView) :
View(AView),
MouseCaptured(0),
MouseMoved(0)
{
//fprintf(stderr, "Create ExModel %p View %p\n", this, View);
View->MView = this;
}
ExModelView::~ExModelView() {
//fprintf(stderr, "Delete ExModel %p View %p\n", this, View);
//if (View->MView == this)
// View->MView = 0;
delete View;
}
int ExModelView::GetContext() {
return View->GetContext();
}
void ExModelView::Activate(int gotfocus) {
ExView::Activate(gotfocus);
View->Activate(gotfocus);
}
EEventMap *ExModelView::GetEventMap() {
return View->GetEventMap();
}
int ExModelView::ExecCommand(ExCommands Command, ExState &State) {
return View->ExecCommand(Command, State);
}
int ExModelView::BeginMacro() {
return View->BeginMacro();
}
void ExModelView::HandleEvent(TEvent &Event) {
ExView::HandleEvent(Event);
View->HandleEvent(Event);
}
void ExModelView::UpdateView() {
View->UpdateView();
}
void ExModelView::RepaintView() {
View->RepaintView();
}
void ExModelView::RepaintStatus() {
View->RepaintStatus();
}
void ExModelView::UpdateStatus() {
View->UpdateStatus();
}
void ExModelView::Resize(int width, int height) {
View->Resize(width, height);
}
|