Adds documentation for all internal widgets.

This commit is contained in:
Atul R
2019-08-02 22:46:03 +02:00
parent 8ee0b9ad51
commit 255d0eef91
10 changed files with 193 additions and 7 deletions
+2 -2
View File
@@ -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){ \
+1 -1
View File
@@ -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 -1
View File
@@ -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;
}