Correction of the windows resize
This commit is contained in:
parent
3c468e612c
commit
1ba8901f74
@ -116,6 +116,7 @@ bool ewol::Widget::CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY)
|
||||
{
|
||||
m_size.x = availlableX;
|
||||
m_size.y = availlableY;
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -186,11 +186,11 @@ namespace ewol {
|
||||
bool m_userFillX;
|
||||
bool m_userFillY;
|
||||
public:
|
||||
void SetOrigin(etkFloat_t x, etkFloat_t y) { m_origin.x=x; m_origin.y=y; };
|
||||
void SetOrigin(etkFloat_t x, etkFloat_t y) { m_origin.x=x; m_origin.y=y;};
|
||||
coord GetOrigin(void) { return m_origin; };
|
||||
virtual bool CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY); // this generate the current size ...
|
||||
//update the min Size ... and the expend parameters for the sizer
|
||||
virtual bool CalculateMinSize(void) {m_minSize.x = m_userMinSize.x; m_minSize.y = m_userMinSize.y; return true; };
|
||||
virtual bool CalculateMinSize(void) {m_minSize.x = m_userMinSize.x; m_minSize.y = m_userMinSize.y; MarkToReedraw(); return true; };
|
||||
virtual void SetMinSize(etkFloat_t x=-1, etkFloat_t y=-1) { m_userMinSize.x = x; m_userMinSize.y = y; };
|
||||
coord GetMinSize(void) { return m_minSize; };
|
||||
coord GetSize(void) { return m_size; };
|
||||
|
@ -389,6 +389,36 @@ void X11_Run(void)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Expose:
|
||||
EWOL_DEBUG("X11 event Expose");
|
||||
break;
|
||||
case GraphicsExpose:
|
||||
EWOL_DEBUG("X11 event GraphicsExpose");
|
||||
break;
|
||||
case NoExpose:
|
||||
EWOL_DEBUG("X11 event NoExpose");
|
||||
break;
|
||||
case CreateNotify:
|
||||
EWOL_DEBUG("X11 event CreateNotify");
|
||||
break;
|
||||
case DestroyNotify:
|
||||
EWOL_DEBUG("X11 event DestroyNotify");
|
||||
break;
|
||||
case GravityNotify:
|
||||
EWOL_DEBUG("X11 event GravityNotify");
|
||||
break;
|
||||
case VisibilityNotify:
|
||||
EWOL_DEBUG("X11 event VisibilityNotify");
|
||||
break;
|
||||
case CirculateNotify:
|
||||
EWOL_DEBUG("X11 event CirculateNotify");
|
||||
break;
|
||||
case ReparentNotify:
|
||||
EWOL_DEBUG("X11 event ReparentNotify");
|
||||
break;
|
||||
case PropertyNotify:
|
||||
EWOL_DEBUG("X11 event PropertyNotify");
|
||||
break;
|
||||
case ConfigureNotify:
|
||||
m_originX = event.xconfigure.x;
|
||||
m_originY = event.xconfigure.y;
|
||||
|
@ -81,6 +81,7 @@ bool ewol::Button::CalculateMinSize(void)
|
||||
int32_t minHeight = ewol::GetHeight(fontId);
|
||||
m_minSize.x = 16+minWidth;
|
||||
m_minSize.y = 16+minHeight;
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -155,7 +156,7 @@ void ewol::Button::OnRegenerateDisplay(void)
|
||||
|
||||
bool ewol::Button::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
EWOL_DEBUG("Event on BT ...");
|
||||
//EWOL_DEBUG("Event on BT ...");
|
||||
if (1 == IdInput) {
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
// nothing to do ...
|
||||
|
@ -77,6 +77,7 @@ bool ewol::CheckBox::CalculateMinSize(void)
|
||||
etkFloat_t boxSize = etk_max(20, minHeight) + 5;
|
||||
m_minSize.x = boxSize+minWidth;
|
||||
m_minSize.y = etk_max(boxSize, minHeight)+3;
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -138,7 +139,7 @@ void ewol::CheckBox::OnRegenerateDisplay(void)
|
||||
|
||||
bool ewol::CheckBox::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
EWOL_DEBUG("Event on checkbox ...");
|
||||
//EWOL_DEBUG("Event on checkbox ...");
|
||||
if (1 == IdInput) {
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
if(true == m_value) {
|
||||
|
@ -160,7 +160,7 @@ void ewol::Entry::OnRegenerateDisplay(void)
|
||||
|
||||
bool ewol::Entry::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
EWOL_DEBUG("Event on Entry ...");
|
||||
//EWOL_DEBUG("Event on Entry ...");
|
||||
if (1 == IdInput) {
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
// nothing to do ...
|
||||
|
@ -71,6 +71,7 @@ bool ewol::Label::CalculateMinSize(void)
|
||||
int32_t minHeight = ewol::GetHeight(fontId);
|
||||
m_minSize.x = 3+minWidth;
|
||||
m_minSize.y = 3+minHeight;
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,7 @@ bool ewol::PopUp::CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY)
|
||||
|
||||
bool ewol::PopUp::CalculateMinSize(void)
|
||||
{
|
||||
//EWOL_DEBUG("CalculateMinSize");
|
||||
m_userExpendX=false;
|
||||
m_userExpendY=false;
|
||||
m_minSize.x = 50.0;
|
||||
@ -102,6 +103,7 @@ bool ewol::PopUp::CalculateMinSize(void)
|
||||
m_minSize.y = tmpSize.y;
|
||||
}
|
||||
//EWOL_DEBUG("CalculateMinSize(" << m_minSize.x << "," << m_minSize.y << ")");
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ extern const char * const ewolEventFileStdPopUpButton3 = "ewol event std_pop_up
|
||||
extern const char * const ewolEventFileStdPopUpButton4 = "ewol event std_pop_up BT4";
|
||||
|
||||
|
||||
ewol::FileChooser::FileChooser(void)
|
||||
ewol::StdPopUp::StdPopUp(void)
|
||||
{
|
||||
AddEventId(ewolEventFileStdPopUpCancel);
|
||||
AddEventId(ewolEventFileStdPopUpValidate);
|
||||
@ -122,13 +122,13 @@ ewol::FileChooser::FileChooser(void)
|
||||
}
|
||||
|
||||
|
||||
ewol::FileChooser::~FileChooser(void)
|
||||
ewol::StdPopUp::~StdPopUp(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ewol::FileChooser::SetTitle(etk::String label)
|
||||
void ewol::StdPopUp::SetTitle(etk::String label)
|
||||
{
|
||||
ewol::Label * tmpWidget = (ewol::Label*)ewol::widgetManager::Get(m_widgetTitleId);
|
||||
if (NULL == tmpWidget) {
|
||||
@ -137,7 +137,7 @@ void ewol::FileChooser::SetTitle(etk::String label)
|
||||
tmpWidget->SetLabel(label);
|
||||
}
|
||||
|
||||
void ewol::FileChooser::SetValidateLabel(etk::String label)
|
||||
void ewol::StdPopUp::SetValidateLabel(etk::String label)
|
||||
{
|
||||
ewol::Button * tmpWidget = (ewol::Button*)ewol::widgetManager::Get(m_widgetValidateId);
|
||||
if (NULL == tmpWidget) {
|
||||
@ -146,7 +146,7 @@ void ewol::FileChooser::SetValidateLabel(etk::String label)
|
||||
tmpWidget->SetLabel(label);
|
||||
}
|
||||
|
||||
void ewol::FileChooser::SetCancelLabel(etk::String label)
|
||||
void ewol::StdPopUp::SetCancelLabel(etk::String label)
|
||||
{
|
||||
ewol::Button * tmpWidget = (ewol::Button*)ewol::widgetManager::Get(m_widgetCancelId);
|
||||
if (NULL == tmpWidget) {
|
||||
@ -155,14 +155,14 @@ void ewol::FileChooser::SetCancelLabel(etk::String label)
|
||||
tmpWidget->SetLabel(label);
|
||||
}
|
||||
|
||||
void ewol::FileChooser::SetFolder(etk::String folder)
|
||||
void ewol::StdPopUp::SetFolder(etk::String folder)
|
||||
{
|
||||
m_folder = folder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ewol::FileChooser::OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y)
|
||||
bool ewol::StdPopUp::OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
EWOL_INFO("Receive Event from the BT ... : widgetid=" << widgetID << "\"" << generateEventId << "\" ==> internalEvent=\"" << eventExternId << "\"" );
|
||||
if (ewolEventFileChooserCancel == eventExternId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user