Adds update geometry
This commit is contained in:
parent
df7a0ab565
commit
3b8794f5e2
@ -49,7 +49,7 @@ Napi::Value setLayout(const Napi::CallbackInfo& info){ \
|
||||
return env.Null(); \
|
||||
} \
|
||||
\
|
||||
Napi::Value setStyleSheet(const Napi::CallbackInfo& info) { \
|
||||
Napi::Value setStyleSheet(const Napi::CallbackInfo& info){ \
|
||||
Napi::Env env = info.Env(); \
|
||||
Napi::HandleScope scope(env); \
|
||||
Napi::String text = info[0].As<Napi::String>(); \
|
||||
@ -122,6 +122,12 @@ Napi::Value update(const Napi::CallbackInfo& info){ \
|
||||
this->instance->update(); \
|
||||
return env.Null(); \
|
||||
} \
|
||||
Napi::Value updateGeometry(const Napi::CallbackInfo& info){ \
|
||||
Napi::Env env = info.Env(); \
|
||||
Napi::HandleScope scope(env); \
|
||||
this->instance->updateGeometry(); \
|
||||
return env.Null(); \
|
||||
} \
|
||||
Napi::Value size(const Napi::CallbackInfo& info){ \
|
||||
Napi::Env env = info.Env(); \
|
||||
Napi::HandleScope scope(env); \
|
||||
@ -154,9 +160,7 @@ Napi::Value size(const Napi::CallbackInfo& info){ \
|
||||
InstanceMethod("setMinimumSize",&WidgetWrapName::setMinimumSize), \
|
||||
InstanceMethod("repaint",&WidgetWrapName::repaint), \
|
||||
InstanceMethod("update",&WidgetWrapName::update), \
|
||||
InstanceMethod("updateGeometry",&WidgetWrapName::updateGeometry), \
|
||||
InstanceMethod("size",&WidgetWrapName::size), \
|
||||
|
||||
#endif // QWIDGET_WRAPPED_METHODS_EXPORT_DEFINE
|
||||
|
||||
|
||||
|
||||
|
||||
@ -57,6 +57,9 @@ export abstract class NodeWidget extends EventWidget {
|
||||
update = () => {
|
||||
this.native.update();
|
||||
};
|
||||
updateGeometry = () => {
|
||||
this.native.updateGeometry();
|
||||
};
|
||||
size = (): { width: number; height: number } => {
|
||||
return this.native.size();
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user