📄 combobox.man
字号:
XXmmCCRR__MMOODDIIFFYYIINNGG__TTEEXXTT__VVAALLUUEE or XXmmCCRR__MMOOVVIINNGG__IINNSSEERRTT__CCUURRSSOORR. _e_v_e_n_t Points to the XXEEvveenntt, which triggered the callback. _d_o_i_t Indicates whether the offending action should be performed. Setting this field of the callback structure to FFaallssee denies the action. _c_u_r_r_I_n_s_e_r_t Specifies the current position of the insert cursor. Indicates the position at which the user attempts to position the cursor. _s_t_a_r_t_P_o_s Indicates the starting position of the text to modify. If the reason is XXmmCCRR__MMOOVVIINNGG__IINNSSEERRTT__CCUURRSSOORR this value is the same as ccuurrrrIInnsseerrtt. _e_n_d_P_o_s Specifies the ending position of the text to modify. If no text is replaced or deleted, then the value will be the same as ssttaarrttPPooss. If the reason is XXmmCCRR__MMOODDIIFFYYIINNGG__TTEEXXTT__VVAALLUUEE this value is the same as _c_u_r_r_I_n_s_e_r_t. _t_e_x_t Holds the address of a structure of type XXmmTTeexxttBBlloocckkRReecc which holds the textual information to be inserted. The following table describes the reasons why the individ- ual verification callback structure fields are valid. RReeaassoonn VVaalliidd FFiieellddss ----------------------------------------------------- XXmmCCRR__MMOODDIIFFYYIINNGG__TTEEXXTT__VVAALLUUEE _r_e_a_s_o_n, _e_v_e_n_t, _d_o_i_t, _s_t_a_r_t_P_o_s, _e_n_d_P_o_s, _t_e_x_t XXmmCCRR__MMOOVVIINNGG__IINNSSEERRTT__CCUURRSSOORR _r_e_a_s_o_n, _e_v_e_n_t, _d_o_i_t, _c_u_r_r_I_n_s_e_r_t, _n_e_w_I_n_s_e_r_t, A pointer to the following structure is passed to the XXmmNN-- ssoorrttiinnggCCaallllbbaacckk callback: ttyyppeeddeeff ssttrruucctt {{ iinntt _r_e_a_s_o_n;; XXEEvveenntt **_e_v_e_n_t;;Version 1.31 20 March 1995 13XmComboBox(3Xm) Harry's Motif Tools XmComboBox(3Xm) iinntt _o_p_e_r_a_t_i_o_n;; vvooiidd **_i_t_e_m___i_n_t_e_r_n_a_l;; XXmmSSttrriinngg _i_t_e_m;; iinntt _r_e_s_u_l_t;; }} XXmmCCoommbbooBBooxxSSoorrttiinnggCCaallllbbaacckkSSttrruucctt,, **XXmmCCoommbbooBBooxxSSoorrttiinnggPPttrr;; _r_e_a_s_o_n Indicates the reason why the callback was activated. This is XXmmCCRR__SSOORRTTIINNGG. _e_v_e_n_t Contains always NNUULLLL and is just there for compatibility reasons. _o_p_e_r_a_t_i_o_n Indicates the operation to carry out and can be either XXmmOOPP__IINNIITT,XXmmOOPP__DDOONNEE or XXmmOOPP__CCOOMMPPAARREE. _i_t_e_m___i_n_t_e_r_n_a_l Must be set during the XXmmOOPP__IINNIITT operation to a suitable representation of the new item which is to be added to the list. In all subsequent calls to this callback with XXmmOOPP__CCOOMMPPAARREEorXXmmOOPP__DDOONNEE this field will contain whatever you've put into it during XXmmOOPP__IINNIITT. For detailed information refer to the documentation "_T_h_e _C_o_m_b_o_B_o_x _W_i_d_g_e_t". _i_t_e_m During XXmmOOPP__IINNIITT this field points to the item to be added to the list. When sorting the list ( XXmmOOPP__CCOOMMPPAARREE) the field contains the address of an item in the list which should be compared against the new item (as remembered in _i_t_e_m___i_n_t_e_r_n_a_l). _r_e_s_u_l_t When comparing an item (out of the list) in _i_t_e_m with the new item (as remembered in _i_t_e_m___i_n_t_e_r_n_a_l) the result has to be stored into this structure's field. The following table describes which individual callback structure fields are valid during which operations. RReeaassoonn VVaalliidd FFiieellddss --------------------------------------------- XXmmOOPP__IINNIITT _r_e_a_s_o_n, _e_v_e_n_t, _o_p_e_r_a_t_i_o_n, _i_t_e_m, _i_t_e_m___i_n_t_e_r_n_a_l XXmmOOPP__DDOONNEE _r_e_a_s_o_n, _e_v_e_n_t, _o_p_e_r_a_t_i_o_n, _i_t_e_m___i_n_t_e_r_n_a_l XXmmOOPP__CCOOMMPPAARREE _r_e_a_s_o_n, _e_v_e_n_t, _o_p_e_r_a_t_i_o_n, _i_t_e_m, _i_t_e_m___i_n_t_e_r_n_a_l, _r_e_s_u_l_t For more information about controlling the sorting order see the acompanying documentation "_T_h_e _C_o_m_b_o_B_o_x _W_i_d_g_e_t". CCoonnvveenniieennccee rroouuttiinneess ComboBox has a number of convenience routines to controlVersion 1.31 20 March 1995 14XmComboBox(3Xm) Harry's Motif Tools XmComboBox(3Xm) the behavior and contents of its children. vvooiidd XXmmCCoommbbooBBooxxAAddddIItteemm((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm,, iinntt ppooss)) Add a new item to the list's contents. If XXmmNNssoorrtteedd is set to True, the new item is inserted alphabeti- cally. If the list is unsorted, the same assump- tions can be applied as with XXmmLLiissttAAddddIItteemm. vvooiidd XXmmCCoommbbooBBooxxAAddddIItteemmss((WWiiddggeett ww,, XXmmSSttrriinngg **iitteemmss,, iinntt iitteemm__ccoouunntt,, iinntt ppooss)) Similar to XXmmCCoommbbooBBooxxAAddddIItteemm. Also see XXmmLLiissttAAdd-- ddIItteemmss. vvooiidd XXmmCCoommbbooBBooxxAAddddIItteemmUUnnsseelleecctteedd((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm,, iinntt ppooss)) See XXmmLLiissttAAddddIItteemmUUnnsseelleecctteedd. vvooiidd XXmmCCoommbbooBBooxxCClleeaarrIItteemmSSeelleeccttiioonn((WWiiddggeett ww)) Deselects all currently selected items when XXmmNNsseelleeccttiioonnPPoolliiccyy is XXmmSSIINNGGLLEE__SSEELLEECCTT. vvooiidd XXmmCCoommbbooBBooxxDDeelleetteeIItteemm((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm)) See XXmmLLiissttDDeelleetteeIItteemm. vvooiidd XXmmCCoommbbooBBooxxDDeelleetteeIItteemmss((WWiiddggeett ww,, XXmmSSttrriinngg **iitteemmss,, iinntt iitteemm__ccoouunntt)) See XXmmLLiissttDDeelleetteeIItteemmss. vvooiidd XXmmCCoommbbooBBooxxDDeelleetteePPooss((WWiiddggeett ww,, iinntt ppooss)) See XXmmLLiissttDDeelleetteePPooss. vvooiidd XXmmCCoommbbooBBooxxDDeelleetteeIItteemmssPPooss((WWiiddggeett ww,, iinntt iitteemm__ccoouunntt,, iinntt ppooss)) See XXmmLLiissttDDeelleetteeIItteemmssPPooss. vvooiidd XXmmCCoommbbooBBooxxDDeelleetteeAAllllIItteemmss((WWiiddggeett ww)) See XXmmLLiissttDDeelleetteeAAllllIItteemmss. vvooiidd XXmmCCoommbbooBBooxxRReeppllaacceeIItteemmss((WWiiddggeett ww,, XXmmSSttrriinngg **oolldd__iitteemmss,, iinntt iitteemm__ccoouunntt,, XXmmSSttrriinngg **nneeww__iitteemmss)) See XXmmLLiissttRReeppllaacceeIItteemmss. vvooiidd XXmmCCoommbbooBBooxxRReeppllaacceeIItteemmssPPooss((WWiiddggeett ww,, XXmmSSttrriinngg **nneeww__iitteemmss,, iinntt iitteemm__ccoouunntt,, iinntt ppoossiittiioonn))Version 1.31 20 March 1995 15XmComboBox(3Xm) Harry's Motif Tools XmComboBox(3Xm) See XXmmLLiissttRReeppllaacceeIItteemmssPPooss. BBoooolleeaann XXmmCCoommbbooBBooxxIItteemmEExxiissttss((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm)) See XXmmLLiissttIItteemmEExxiissttss. iinntt XXmmCCoommbbooBBooxxIItteemmPPooss((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm)) See XXmmLLiissttIItteemmPPooss. BBoooolleeaann XXmmCCoommbbooBBooxxGGeettMMaattcchhPPooss((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm,, iinntt ****ppooss__lliisstt,, iinntt **ppooss__ccoouunntt)) See XXmmLLiissttGGeettMMaattcchhPPooss. vvooiidd XXmmCCoommbbooBBooxxSSeelleeccttPPooss((WWiiddggeett ww,, iinntt ppooss,, BBoooolleeaann nnoottiiffyy)) See XXmmLLiissttSSeelleeccttPPooss. vvooiidd XXmmCCoommbbooBBooxxSSeelleeccttIItteemm((WWiiddggeett ww,, XXmmSSttrriinngg iitteemm,, BBoooolleeaann nnoottiiffyy)) See XXmmLLiissttSSeelleeccttIItteemm. iinntt XXmmCCoommbbooBBooxxGGeettSSeelleecctteeddPPooss((WWiiddggeett ww)) This function differs from XXmmLLiissttGGeettSSeelleecctteeddPPooss. The list in a combo box can contain only one selected item. Therefore this function returns the index of the selected item in the list or zero, if none is currently selected. vvooiidd XXmmCCoommbbooBBooxxCClleeaarrSSeelleeccttiioonn((WWiiddggeett ww,, TTiimmee ttiimmee)) See XXmmTTeexxttFFiieellddCClleeaarrSSeelleeccttiioonn. BBoooolleeaann XXmmCCoommbbooBBooxxCCooppyy((WWiiddggeett ww,, TTiimmee ttiimmee)) See XXmmTTeexxttFFiieellddCCooppyy. BBoooolleeaann XXmmCCoommbbooBBooxxCCuutt((WWiiddggeett ww,, TTiimmee ttiimmee)) See XXmmTTeexxttFFiieellddCCuutt. XXmmTTeexxttPPoossiittiioonn XXmmCCoommbbooBBooxxGGeettIInnsseerrttiioonnPPoossiittiioonn((WWiiddggeett ww)) See XXmmTTeexxttFFiieellddGGeettIInnsseerrttiioonnPPoossiittiioonn. XXmmTTeexxttPPoossiittiioonn XXmmCCoommbbooBBooxxGGeettLLaassttPPoossiittiioonn((WWiiddggeett ww)) See XXmmTTeexxttFFiieellddGGeettLLaassttPPoossiittiioonn.Version 1.31 20 March 1995 16XmComboBox(3Xm) Harry's Motif Tools XmComboBox(3Xm) iinntt XXmmCCoommbbooBBooxxGGeettMMaaxxLLeennggtthh((WWiiddggeett ww)) See XXmmTTeexxttFFiieellddGGeettMMaaxxLLeennggtthh. cchhaarr **XXmmCCoommbbooBBooxxGGeettSSeelleeccttiioonn((WWiiddggeett ww)) See XXmmTTeexxttFFiieellddGGeettSSeelleeccttiioonn. BBoooolleeaann XXmmCCoommbbooBBooxxGGeettSSeelleeccttiioonnPPoossiittiioonn((WWiiddggeett ww,, XXmmTTeexxttPPoossiittiioonn **lleefftt,, XXmmTTeexxttPPoossiittiioonn **rriigghhtt))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -