change the clipping with the viewport
This commit is contained in:
parent
9f2718f97a
commit
e2e0fc25d3
@ -159,9 +159,12 @@ bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveTy
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent, ewol::eventPosition_ts pos)
|
||||||
{
|
{
|
||||||
if (true == WidgetScrooled::OnEventInput(IdInput, typeEvent, x, y)) {
|
if (m_bufferID < 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (true == WidgetScrooled::OnEventInput(IdInput, typeEvent, pos)) {
|
||||||
ewol::widgetManager::FocusKeep(this);
|
ewol::widgetManager::FocusKeep(this);
|
||||||
// nothing to do ... done on upper widet ...
|
// nothing to do ... done on upper widet ...
|
||||||
return true;
|
return true;
|
||||||
@ -171,8 +174,7 @@ bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent,
|
|||||||
if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
|
if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
|
||||||
m_buttunOneSelected = true;
|
m_buttunOneSelected = true;
|
||||||
ewol::widgetManager::FocusKeep(this);
|
ewol::widgetManager::FocusKeep(this);
|
||||||
//EDN_INFO("mouse-event BT1 ==> One Clicked %d, %d", (uint32_t)event->x, (uint32_t)event->y);
|
BufferManager::Get(m_bufferID)->MouseEvent(pos.local.x, pos.local.y);
|
||||||
BufferManager::Get(m_bufferID)->MouseEvent(x, y);
|
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
} else if (ewol::EVENT_INPUT_TYPE_UP == typeEvent) {
|
} else if (ewol::EVENT_INPUT_TYPE_UP == typeEvent) {
|
||||||
m_buttunOneSelected = false;
|
m_buttunOneSelected = false;
|
||||||
@ -183,25 +185,22 @@ bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent,
|
|||||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||||
#ifdef __MODE__Touch
|
#ifdef __MODE__Touch
|
||||||
ewol::widgetManager::FocusKeep(this);
|
ewol::widgetManager::FocusKeep(this);
|
||||||
//EDN_INFO("mouse-event BT1 ==> One Clicked %d, %d", (uint32_t)event->x, (uint32_t)event->y);
|
BufferManager::Get(m_bufferID)->MouseEvent(pos.local.x, pos.local.y);
|
||||||
BufferManager::Get(m_bufferID)->MouseEvent(x, y);
|
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
#else
|
#else
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
#endif
|
#endif
|
||||||
} else if (ewol::EVENT_INPUT_TYPE_DOUBLE == typeEvent) {
|
} else if (ewol::EVENT_INPUT_TYPE_DOUBLE == typeEvent) {
|
||||||
//EDN_INFO("mouse-event BT1 ==> Double Clicked %d, %d", (uint32_t)event->x, (uint32_t)event->y);
|
|
||||||
BufferManager::Get(m_bufferID)->MouseEventDouble();
|
BufferManager::Get(m_bufferID)->MouseEventDouble();
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
} else if (ewol::EVENT_INPUT_TYPE_TRIPLE == typeEvent) {
|
} else if (ewol::EVENT_INPUT_TYPE_TRIPLE == typeEvent) {
|
||||||
//EDN_INFO("mouse-event BT1 ==> Triple Clicked");
|
|
||||||
BufferManager::Get(m_bufferID)->MouseEventTriple();
|
BufferManager::Get(m_bufferID)->MouseEventTriple();
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
} else if (ewol::EVENT_INPUT_TYPE_MOVE == typeEvent) {
|
} else if (ewol::EVENT_INPUT_TYPE_MOVE == typeEvent) {
|
||||||
if (true == m_buttunOneSelected) {
|
if (true == m_buttunOneSelected) {
|
||||||
int xxx, yyy;
|
int xxx, yyy;
|
||||||
xxx = x;
|
xxx = pos.local.x;
|
||||||
yyy = y;
|
yyy = pos.local.y;
|
||||||
if (xxx<0) {
|
if (xxx<0) {
|
||||||
xxx = 0;
|
xxx = 0;
|
||||||
}
|
}
|
||||||
@ -215,7 +214,7 @@ bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent,
|
|||||||
}
|
}
|
||||||
} else if (2 == IdInput) {
|
} else if (2 == IdInput) {
|
||||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||||
BufferManager::Get(m_bufferID)->MouseEvent(x, y);
|
BufferManager::Get(m_bufferID)->MouseEvent(pos.local.x, pos.local.y);
|
||||||
BufferManager::Get(m_bufferID)->Paste(COPY_MIDDLE_BUTTON);
|
BufferManager::Get(m_bufferID)->Paste(COPY_MIDDLE_BUTTON);
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
ewol::widgetManager::FocusKeep(this);
|
ewol::widgetManager::FocusKeep(this);
|
||||||
|
@ -58,7 +58,7 @@ class CodeView :public ewol::WidgetScrooled
|
|||||||
virtual void OnRegenerateDisplay(void);
|
virtual void OnRegenerateDisplay(void);
|
||||||
bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y);
|
bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y);
|
||||||
public:
|
public:
|
||||||
virtual bool OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y);
|
virtual bool OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent, ewol::eventPosition_ts pos);
|
||||||
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
|
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
|
||||||
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);
|
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);
|
||||||
virtual void OnGetFocus(void);
|
virtual void OnGetFocus(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user