campo-sirio/ba/ba0102.h
guy 8c42e5fa15 Patch level : 2.0 nopatch
Files correlati     : ba0.exe
Ricompilazione Demo : [ ]
Commento            :

Aggiunto menu preferiti.
Corretta gestione "Aggiungi a preferiti" nel caso di Expolrer mode


git-svn-id: svn://10.65.10.50/trunk@11495 c028cbd2-c16b-5b4b-a496-9718f37d4682
2003-10-14 13:44:01 +00:00

76 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);
#endif