Quantum Fog  0.9.3
C_PI_WIND.h
1 #pragma once
2 
3 #include "QFog_constants.h"
4 #include "QB_NET.h"
5 #include "C_PI_ND_EFIELD.h"
6 #include "C_PI_ND_POPUP.h"
7 #include "C_PI_PARENTS_TABLE.h"
8 #include "C_PI_AMPS_TABLE.h"
9 #include "BEAM_SPL.h"
10 #include "C_HOST_VIEW.h"
11 #include "UModalDialogsPlus.h"
12 #include "QBIT_ROT.h"
13 #include "C_TOP_PTRS.h"
14 
15 
16 //PI_WIND = Prior Information Window
17 //******************************************
18 class C_PI_WIND : public LWindow, public LListener, public C_TOP_PTRS
19 {
20 
21 protected:
22  USHORT its_nd;
23  TM_COL_NUM its_in_st; //in_st = in state = parents' state
24  COORD_SYSTEM its_coord_sys; //COORD_SYS defined in "QFog_constants.h"
25 
26 
27  LCaption * its_owner_cap_p;
28  C_PI_ND_EFIELD * its_nd_efield_p;
29  C_PI_ND_POPUP * its_nd_popup_p;
30 
31  LStdButton * its_first_nd_but_p;
32  LStdButton * its_next_nd_but_p;
33 
34  //in_st = incomming state = parent state
35  LStdButton * its_first_in_st_but_p;
36  LStdButton * its_prev_in_st_but_p;
37  LStdButton * its_next_in_st_but_p;
38 
39  C_PI_PARENTS_TABLE * its_parents_table_p;
40 
41  LStdButton * its_all_act_but_p;
42  LStdButton * its_none_act_but_p;
43 
44  LStdRadioButton * its_polar_radio_p;
45  LStdRadioButton * its_rect_radio_p;
46 
47  LCaption * its_rad_re_cap_p;
48  LCaption * its_ang_im_cap_p;
49 
50  C_PI_AMPS_TABLE * its_amps_table_p;
51 
52  LCaption * its_num_of_rows_cap_p;
53  LStdButton * its_num_of_rows_but_p;
54  LStdButton * its_total_prob_but_p;
55  LCaption * its_total_prob_cap_p;
56 
57  ST_NAMES_GENERATOR_DATA its_st_names_gen_data;
58  LStdButton * its_gen_amps_but_p;
59 
60 public:
61 
62  C_PI_WIND(LStream * inStream);
63  C_PI_WIND();
64  virtual ~C_PI_WIND();
65  VOID show_owner( const LStr255 & file_name);
66  VOID special_finish_create(const LStr255 & file_name, USHORT sel_nd);
67  BOOLEAN save_pi();
68  VOID AttemptClose();
69  VOID DoClose();
70 
71  USHORT get_nd();
72  VOID set_nd_always(USHORT new_nd);
73  VOID set_nd_always();
74  VOID set_nd_if_diff(USHORT new_nd);
75  VOID set_in_st(TM_COL_NUM new_in_st);
76  VOID set_in_st_if_diff(TM_COL_NUM new_in_st);
77 
78  VOID toggle_coord_sys();
79 
80  VOID refresh_total_prob_cap();
81  VOID clear_total_prob_cap();
82 
83  VOID refresh_num_of_rows_cap();
84  BOOLEAN handle_num_of_rows_dialog();
85 
86  BOOLEAN gen_st_names_dialog_entries_are_legal(ST_NAMES_GENERATOR_DATA & v);
87  BOOLEAN handle_gen_st_names_dialog();
88 
89  BOOLEAN handle_reorder_nds_dialog();
90  BOOLEAN handle_reorder_in_nds_dialog();
91  BOOLEAN handle_reorder_nd_sts_dialog();
92 
93  BOOLEAN focus_nd_has_this_many_parents(USHORT num);
94  BOOLEAN focus_nd_parents_are_binary();
95 
96  VOID ListenToMessage(MessageT inMessage, VOID * ioParam );
97 
98  VOID Click(SMouseDownEvent & inMouseDown);
99  VOID ClickSelf(const SMouseDownEvent & inMouseDown);
100  VOID rename_a_nd(USHORT nd, Str255 new_name_pstr);
101 
102  virtual BOOLEAN HandleKeyPress(const EventRecord & in_key_event);
103  virtual BOOLEAN ObeyCommand(CommandT inCommand, VOID * ioParam);
104  virtual VOID FindCommandStatus(CommandT inCommand,
105  BOOLEAN & outEnabled, BOOLEAN & outUsesMark,
106  UInt16 & outMark, Str255 outName_pstr);
107 
108 };
109 #pragma mark -
110 
111 
112 //******************************************
113 inline
114 BOOLEAN C_PI_WIND::save_pi()
115 {
116  return its_amps_table_p->unload_editor();
117 }
118 //******************************************
119 inline
120 USHORT C_PI_WIND::get_nd()
121 {
122  return its_nd;
123 }
124 //******************************************
125 inline
126 VOID C_PI_WIND::set_nd_always()
127 {
128  set_nd_always(its_nd);
129 }
130 //******************************************
131 inline
132 VOID C_PI_WIND::set_nd_if_diff(
133 USHORT new_nd) //in
134 {
135  if(its_nd!=new_nd) set_nd_always(new_nd);
136 }
137 //******************************************
138 inline
139 VOID C_PI_WIND::set_in_st_if_diff(
140 TM_COL_NUM new_in_st) //in
141 {
142  if(its_in_st!=new_in_st) set_in_st(new_in_st);
143 
144 }
145 //******************************************
146 inline
147 VOID C_PI_WIND::clear_total_prob_cap()
148 {
149  its_total_prob_cap_p->SetDescriptor("\p");
150 }
Definition: C_PI_PARENTS_TABLE.h:8
Definition: NODE.h:28
Definition: C_TOP_PTRS.h:7
Definition: C_PI_AMPS_TABLE.h:9
Definition: C_PI_ND_EFIELD.h:7
Definition: C_PI_WIND.h:18
Definition: C_PI_ND_POPUP.h:7