Files correlati : Ricompilazione Demo : [ ] Commento :prima faSe dei nuovi menu git-svn-id: svn://10.65.10.50/trunk@11984 c028cbd2-c16b-5b4b-a496-9718f37d4682
77 lines
1.7 KiB
C++
Executable File
77 lines
1.7 KiB
C++
Executable File
#ifndef __BA0102_H
|
|
#define __BA0102_H
|
|
|
|
#ifndef __MASKFLD_H
|
|
#include <maskfld.h>
|
|
#endif
|
|
|
|
#ifndef __TREE_H
|
|
#include <tree.h>
|
|
#endif
|
|
|
|
#ifndef __BA0101_H
|
|
#include "ba0101.h"
|
|
#endif
|
|
|
|
class TMenu_tree : public TBidirectional_tree
|
|
{
|
|
TMenu* _menu;
|
|
const TSubmenu* _submenu;
|
|
int _menuitem;
|
|
|
|
TString _root_id, _curr_id;
|
|
|
|
protected: // TTree
|
|
virtual void node2id(const TObject* node, TString& id) const;
|
|
|
|
public: // TTree
|
|
virtual bool goto_root();
|
|
virtual bool goto_firstson();
|
|
virtual bool goto_rbrother();
|
|
virtual bool goto_node(const TString &id);
|
|
virtual bool has_son() const;
|
|
virtual bool has_rbrother() const;
|
|
virtual TObject* curr_node() const;
|
|
|
|
virtual bool has_root() const;
|
|
virtual bool has_father() const;
|
|
virtual bool has_lbrother() const;
|
|
virtual bool goto_father();
|
|
virtual bool goto_lbrother();
|
|
|
|
virtual void curr_id(TString& id) const { id = _curr_id; }
|
|
virtual bool get_description(TString& desc) const;
|
|
virtual TImage* image(bool selected) const;
|
|
|
|
public:
|
|
const TSubmenu& curr_submenu() const;
|
|
const TMenuitem& curr_item() const;
|
|
|
|
bool find_leaf(const TString& str);
|
|
bool find_string(const TString& str);
|
|
long find_node(const TString& id);
|
|
|
|
TMenu_tree(TMenu& menu);
|
|
virtual ~TMenu_tree() { }
|
|
};
|
|
|
|
class TMenulist_field : public TWindowed_field
|
|
{
|
|
protected: // TWindowed_field
|
|
virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
|
|
|
|
public:
|
|
void set_menu(TMenu_tree& mt);
|
|
void create(short dlg, int x, int y, int dx, int dy);
|
|
void curr_item(TToken_string& id) const;
|
|
|
|
TMenulist_field(TMask* m) : TWindowed_field(m) { }
|
|
virtual ~TMenulist_field() { }
|
|
};
|
|
|
|
// Utilities
|
|
void synchronize_tree_field(TTree_field& tf);
|
|
bool can_be_transparent(const TImage& i);
|
|
|
|
#endif
|