|
|
|
|
|
|
this.wantsMouseEnterLeaveWindow = true; |
|
|
|
} |
|
|
|
|
|
|
|
void OnEnable() { |
|
|
|
protected virtual void Awake() { |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual void OnEnable() { |
|
|
|
if (this._windowAdapter == null) { |
|
|
|
this._windowAdapter = new EditorWindowAdapter(this); |
|
|
|
} |
|
|
|
|
|
|
var rootRenderBox = this.rootRenderBox(); |
|
|
|
RenderBox rootRenderBox; |
|
|
|
using (this._windowAdapter.getScope()) { |
|
|
|
rootRenderBox = this.createRenderBox(); |
|
|
|
} |
|
|
|
|
|
|
|
this._windowAdapter.attachRootWidget(this.rootWidget()); |
|
|
|
Widget rootWidget; |
|
|
|
using (this._windowAdapter.getScope()) { |
|
|
|
rootWidget = this.createWidget(); |
|
|
|
} |
|
|
|
|
|
|
|
this._windowAdapter.attachRootWidget(rootWidget); |
|
|
|
void OnDisable() { |
|
|
|
protected virtual void OnDisable() { |
|
|
|
void OnGUI() { |
|
|
|
protected virtual void OnGUI() { |
|
|
|
void Update() { |
|
|
|
protected virtual void Update() { |
|
|
|
protected virtual RenderBox rootRenderBox() { |
|
|
|
protected virtual RenderBox createRenderBox() { |
|
|
|
protected abstract Widget rootWidget(); |
|
|
|
protected abstract Widget createWidget(); |
|
|
|
} |
|
|
|
|
|
|
|
public class EditorWindowAdapter : WindowAdapter { |
|
|
|