00001
00002
00003
00004
00005
00006 #ifndef __SPLIT_H
00007 #define __SPLIT_H
00008
00009 #include "ncwm.h"
00010
00011 class Frame;
00012 class Tree;
00013
00018 class Split {
00019
00020 public:
00021
00022 static void resize(Tree *root, Tree *origin,
00023 Direction dir, int stepW, int stepH);
00024
00025 static Tree *neighbor(Tree *root, Tree *origin, Direction dir);
00026 static bool isNeighbor(Tree *origin, Tree *target, Direction dir);
00027
00028 static void adjustSize(Tree *tree, bool ignoreVert);
00029
00030 static void detach(Tree *root, Tree *origin);
00031
00032 static Frame *firstLeaf(Tree *tree);
00033
00034 static void attach(Tree *root, Frame *frame, Direction dir);
00035
00036 private:
00037
00039 static int distance(Tree *origin, Tree *target);
00040
00042 static Tree *topMostRoot(Tree *first, Tree *last);
00043
00044 };
00045
00046 #endif // __SPLIT_H