Adds documentation for all internal widgets.
This commit is contained in:
@@ -34,8 +34,8 @@ Napi::Value resize(const Napi::CallbackInfo& info) { \
|
||||
Napi::Value close(const Napi::CallbackInfo& info) { \
|
||||
Napi::Env env = info.Env(); \
|
||||
Napi::HandleScope scope(env); \
|
||||
this->instance->close(); \
|
||||
return env.Null(); \
|
||||
bool hasClosed = this->instance->close(); \
|
||||
return Napi::Boolean::New(env, hasClosed); \
|
||||
} \
|
||||
\
|
||||
Napi::Value setLayout(const Napi::CallbackInfo& info){ \
|
||||
|
||||
@@ -16,7 +16,7 @@ export abstract class NodeWidget extends EventWidget {
|
||||
this.native.resize(width, height);
|
||||
};
|
||||
close = () => {
|
||||
this.native.close();
|
||||
return this.native.close();
|
||||
};
|
||||
setLayout = (parentLayout: NodeLayout) => {
|
||||
const flexLayout = parentLayout as FlexLayout;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export type NativeElement = any;
|
||||
export abstract class Component {
|
||||
protected children = new Set<Component>(); //TODO if react stub these as react will manage the instances from beings gc'ed better.
|
||||
protected children = new Set<Component>();
|
||||
protected parent?: Component;
|
||||
abstract native: NativeElement;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user