84 lines
2.1 KiB
C
84 lines
2.1 KiB
C
|
#ifndef __TREECTRL_H
|
||
|
#define __TREECTRL_H
|
||
|
|
||
|
#ifndef __MASKFLD_H
|
||
|
#include "maskfld.h"
|
||
|
#endif
|
||
|
|
||
|
class TGolem_client_field : public TWindowed_field
|
||
|
{
|
||
|
TGolem_field* _driver;
|
||
|
|
||
|
protected: // TObject
|
||
|
virtual word class_id() const;
|
||
|
virtual bool is_kind_of(word cid) const;
|
||
|
|
||
|
protected: // TWindowed_field
|
||
|
virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
|
||
|
virtual bool parse_item(TScanner& scan);
|
||
|
|
||
|
public:
|
||
|
TGolem_field* driver() const { return _driver; }
|
||
|
virtual bool on_hit();
|
||
|
|
||
|
TGolem_client_field(TMask* m);
|
||
|
virtual ~TGolem_client_field();
|
||
|
};
|
||
|
|
||
|
|
||
|
// Implemented in tree.cpp
|
||
|
class TTree;
|
||
|
|
||
|
class TTree_field : public TWindowed_field
|
||
|
{
|
||
|
protected: // TObject
|
||
|
virtual word class_id() const;
|
||
|
virtual bool is_kind_of(word cid) const;
|
||
|
|
||
|
protected: // TWindowed_field
|
||
|
virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
|
||
|
|
||
|
public:
|
||
|
TTree* tree() const;
|
||
|
void set_tree(TTree* t);
|
||
|
|
||
|
void hide_leaves(bool yes = true);
|
||
|
void show_leaves(bool yes = true) { hide_leaves(!yes); }
|
||
|
bool select_current();
|
||
|
bool goto_selected();
|
||
|
|
||
|
void set_header(const char* head);
|
||
|
void set_row_height(int rh);
|
||
|
|
||
|
TTree_field(TMask* m) : TWindowed_field(m) { }
|
||
|
virtual ~TTree_field() { }
|
||
|
};
|
||
|
|
||
|
class TOutlook_field : public TWindowed_field
|
||
|
{
|
||
|
TString4 _str; // Current selection
|
||
|
|
||
|
protected: // TMask_field
|
||
|
virtual word class_id() const;
|
||
|
virtual bool is_kind_of(word cid) const;
|
||
|
|
||
|
virtual const TString& get_window_data();
|
||
|
virtual void set_window_data(const char* data);
|
||
|
virtual bool on_key(KEY key);
|
||
|
|
||
|
protected: // TWindowed_field
|
||
|
virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
|
||
|
|
||
|
public:
|
||
|
int add_item(short icon, const char* text, int flags);
|
||
|
void create(short dlg, int x, int y, int dx, int dy, WINDOW parent);
|
||
|
|
||
|
virtual void set(const char* data);
|
||
|
virtual const TString& get() const;
|
||
|
|
||
|
TOutlook_field(TMask* m) : TWindowed_field(m) { }
|
||
|
virtual ~TOutlook_field() { }
|
||
|
};
|
||
|
|
||
|
#endif
|