A form / form widget can avoid to have the focus
This commit is contained in:
+5
-3
@@ -24,9 +24,11 @@
|
|||||||
FormField::FormField(Window *parent, const rect_t & rect, WindowFlags windowFlags) :
|
FormField::FormField(Window *parent, const rect_t & rect, WindowFlags windowFlags) :
|
||||||
Window(parent, rect, windowFlags)
|
Window(parent, rect, windowFlags)
|
||||||
{
|
{
|
||||||
FormGroup * form = dynamic_cast<FormGroup *>(parent);
|
if (!(windowFlags & FORM_NO_FOCUS)) {
|
||||||
if (form) {
|
FormGroup * form = dynamic_cast<FormGroup *>(parent);
|
||||||
form->addField(this);
|
if (form) {
|
||||||
|
form->addField(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -22,8 +22,9 @@
|
|||||||
|
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
constexpr WindowFlags FORM_FORWARD_FOCUS = WINDOW_FLAGS_LAST << 1;
|
constexpr WindowFlags FORM_NO_FOCUS = WINDOW_FLAGS_LAST << 1;
|
||||||
constexpr WindowFlags FORM_DETACHED = WINDOW_FLAGS_LAST << 2;
|
constexpr WindowFlags FORM_FORWARD_FOCUS = WINDOW_FLAGS_LAST << 2;
|
||||||
|
constexpr WindowFlags FORM_DETACHED = WINDOW_FLAGS_LAST << 3;
|
||||||
constexpr WindowFlags FORM_FLAGS_LAST = FORM_DETACHED;
|
constexpr WindowFlags FORM_FLAGS_LAST = FORM_DETACHED;
|
||||||
|
|
||||||
class FormField: public Window {
|
class FormField: public Window {
|
||||||
|
|||||||
Reference in New Issue
Block a user