Files correlati : or1.exe Ricompilazione Demo : [ ] Commento : Corretta TCursor::set_region(...) che interpretava male il simbolo ~ git-svn-id: svn://10.65.10.50/trunk@19654 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			160 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			160 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| #ifndef __TREECTRL_H
 | |
| #define __TREECTRL_H
 | |
| 
 | |
| #ifndef __MASKFLD_H
 | |
| #include "maskfld.h"
 | |
| #endif
 | |
| 
 | |
| #ifndef __VARIANT_H
 | |
| #include "variant.h"
 | |
| #endif
 | |
| 
 | |
| // Native control host window: autresizes its unique child control
 | |
| class TControl_host_window : public TField_window
 | |
| {
 | |
| protected:
 | |
|   WINDOW _ctrl;
 | |
| 
 | |
| protected:
 | |
|   virtual long handler(WINDOW win, EVENT* ep);
 | |
|   TControl_host_window(int x, int y, int dx, int dy, 
 | |
|                        WINDOW parent, TWindowed_field* owner);
 | |
| };
 | |
| 
 | |
| 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);
 | |
|   void clear();
 | |
| 
 | |
|   int items() const;
 | |
|   virtual void set(const char* data);
 | |
|   virtual const TString& get() const;
 | |
| 
 | |
|   TOutlook_field(TMask* m) : TWindowed_field(m) { }
 | |
|   virtual ~TOutlook_field() { }
 | |
| };
 | |
| 
 | |
| class TSlider_field : public TWindowed_field
 | |
| {
 | |
|   short _buddy;
 | |
|   real _range_min, _range_max;
 | |
| 
 | |
| 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);
 | |
| 
 | |
| protected: // TWindowed_field
 | |
|   virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
 | |
|   virtual bool parse_item(TScanner& scanner);
 | |
| 
 | |
|   const char* get_buddy() const;
 | |
|   void set_buddy(const char* b) const;
 | |
| 
 | |
| public:
 | |
|   virtual void set(const char* data);
 | |
|   virtual const TString& get() const;
 | |
|   virtual bool on_hit();
 | |
| 
 | |
|   void set_range(const real& mi, const real& ma);
 | |
|   void set_range(int mi, int ma);
 | |
|   void range(real& mi, real& ma);
 | |
| 
 | |
|   TSlider_field(TMask* m);
 | |
|   virtual ~TSlider_field() { }
 | |
| };
 | |
| 
 | |
| 
 | |
| class TProp_field : public TWindowed_field
 | |
| {
 | |
| protected:
 | |
|   virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
 | |
|   virtual bool parse_item(TScanner& scanner);
 | |
| 
 | |
| public:
 | |
|   virtual word class_id() const;
 | |
|   virtual bool is_kind_of(word cid) const;
 | |
| 
 | |
|   void freeze(bool on);
 | |
|   bool set_property(const char* name, const char* value, const char* label = NULL);
 | |
|   bool set_property(const char* name, COLOR value, const char* label = NULL);
 | |
|   bool set_property(const char* name, long value, const char* label = NULL);
 | |
| 
 | |
|   const TString& get_property(const char* name) const;
 | |
|   COLOR get_color_property(const char* name) const;
 | |
|   long get_long_property(const char* name) const;
 | |
|   const TVariant& get_var_property(const char* name) const;
 | |
| 
 | |
|   bool for_each_property(PROP_CALLBACK pcb, void* jolly);
 | |
|   bool current_property(TString& name, TVariant& value) const;
 | |
| 
 | |
|   TProp_field(TMask* m);
 | |
| };
 | |
| 
 | |
| #endif
 |