Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
Copyright (c) 2017 DIVIDE-Studio
Copyright (c) 2009 Ionut Cava

This file is part of DIVIDE Framework.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software
and associated documentation files (the "Software"), to deal in the Software
without restriction,
including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/

#ifndef _IM_WINDOW_DIVIDE_H_
#define _IM_WINDOW_DIVIDE_H_

#include "ImwPlatformWindow.h"

#include "Platform/Headers/DisplayWindow.h"
#include "Platform/Input/Headers/InputInterface.h"

namespace Divide {

class ImwWindowManagerDivide;
class ImwWindowDivide : public ImWindow::ImwPlatformWindow, public PlatformContextComponent
{
    friend class ImwWindowManagerOGL;
  public:
    ImwWindowDivide(ImwWindowManagerDivide& parent, PlatformContext& context, ImWindow::EPlatformWindowType eType, bool bCreateState);
    virtual ~ImwWindowDivide();

    virtual bool Init(ImWindow::ImwPlatformWindow* parent) override;

    virtual ImVec2 GetPosition() const override;
    virtual ImVec2 GetSize() const override;
    virtual bool IsWindowMaximized() const override;
    virtual bool IsWindowMinimized() const override;

    ImVec2 GetDrawableSize() const;

    virtual void Show(bool bShow) override;
    virtual void SetSize(int iWidth, int iHeight) override;
    virtual void SetPosition(int iX, int iY) override;
    virtual void SetWindowMaximized(bool bMaximized) override;
    virtual void SetWindowMinimized() override;
    virtual void SetTitle(const char* pTtile) override;

    inline bool isMainWindow() const { return _isMainWindow; }
    inline DisplayWindow*& nativeWindow() { return _pWindow; }

  protected:
    void onDestroyPlatformWindow();

    virtual void PreUpdate() override;
    virtual void Render() override;


    bool OnClose();
    void OnFocus(bool bHasFocus);
    void OnSize(int iWidth, int iHeight);
    void OnMouseButton(int iButton, bool bDown);
    void OnMouseMove(int iX, int iY);
    void OnMouseWheel(int iStep);
    void OnKey(Divide::Input::KeyCode eKey, bool bDown);
    void OnUTF8(const char* text);

  private:
    ImVec2 _size;
    ImVec2 _drawableSize;
    I64 _windowGUID;
    DisplayWindow* _pWindow;
    bool _isMainWindow = false;
    ImwWindowManagerDivide& _parent;

};
}; //namespace Divide

#endif //_IM_WINDOW_DIVIDE_H_

Commits for Divide-Framework/trunk/Source Code/Editor/Widgets/Headers/ImWindowDivide.h

Diff revisions: vs.
Revision Author Commited Message
970 Diff Diff IonutCava picture IonutCava Mon 13 Nov, 2017 17:16:44 +0000

[Ionut]
- ImWindow <-> DisplayWindow fixes

969 Diff Diff IonutCava picture IonutCava Mon 13 Nov, 2017 00:15:57 +0000

[Ionut]
- Further improve DisplayWindow <-> Input relationship
- Add Flip-Y 2D camera (D3D style projection)
- Fix IMGUI rendering
- Add IMGUI sample and IMWINDOW sample rendering at the same time
- Improve IMWINDOW multi-window support
— Bug: nothing rendering in child platform windows
- Add draw command to move render context from one window to another

965 Diff Diff IonutCava picture IonutCava Sun 05 Nov, 2017 21:54:57 +0000

[Ionut]
- ImWindow updates

963 Diff Diff IonutCava picture IonutCava Sun 05 Nov, 2017 18:31:51 +0000

[Ionut]
- More multi-window fixes
- Profile guided performance improvements

962 Diff Diff IonutCava picture IonutCava Fri 03 Nov, 2017 17:17:55 +0000

[Ionut]
- Fix creation/destruction of multiple DisplayWindows
- Add an InputInterface per DisplayWindow
- More work on the ImWindow based Editor

960 Diff Diff IonutCava picture IonutCava Thu 02 Nov, 2017 17:39:53 +0000

[Ionut]
- Started porting ImWindow to our command buffer based rendering system.
- Also moved mouse positioning system to the window manager since mouse position is always relative to the active window

951 IonutCava picture IonutCava Mon 23 Oct, 2017 23:25:49 +0000

[Ionut]
- Added a new project to the solution: Divide-Editor
— This project will be a Unity-style tool for the framework built using IMGUI and ImWindow
— Examples:

- Modified DisplayWindow class heavily to support new requirements