ui: moved subnode layouting from GraphView to GraphController

This change moves nested layouting of the Graph to GraphController. The DummyNodes get the correct size assigned, as
well as a visible flag. Mouse interaction with the Graph is now handled via the GraphController, which makes it
easier to undo them or reuse the changed state after graph updates.
This commit is contained in:
Eberhard Graether
2014-11-20 20:53:01 +01:00
parent 113aab8e60
commit 048fcb28b4
17 changed files with 831 additions and 459 deletions
@@ -0,0 +1,26 @@
#ifndef MESSAGE_GRAPH_NODE_EXPAND_H
#define MESSAGE_GRAPH_NODE_EXPAND_H
#include "utility/messaging/Message.h"
#include "utility/types.h"
#include "data/graph/token_component/TokenComponentAccess.h"
class MessageGraphNodeExpand: public Message<MessageGraphNodeExpand>
{
public:
MessageGraphNodeExpand(Id tokenId, TokenComponentAccess::AccessType access)
: tokenId(tokenId)
, access(access)
{
}
static const std::string getStaticType()
{
return "MessageGraphNodeExpand";
}
const Id tokenId;
const TokenComponentAccess::AccessType access;
};
#endif // MESSAGE_GRAPH_NODE_EXPAND_H
@@ -0,0 +1,26 @@
#ifndef MESSAGE_GRAPH_NODE_MOVE_H
#define MESSAGE_GRAPH_NODE_MOVE_H
#include "utility/math/Vector2.h"
#include "utility/messaging/Message.h"
#include "utility/types.h"
class MessageGraphNodeMove: public Message<MessageGraphNodeMove>
{
public:
MessageGraphNodeMove(Id tokenId, Vec2i position)
: tokenId(tokenId)
, position(position)
{
}
static const std::string getStaticType()
{
return "MessageGraphNodeMove";
}
const Id tokenId;
const Vec2i position;
};
#endif // MESSAGE_GRAPH_NODE_MOVE_H