On 12/06/2016 01:13 PM, Fred van Stappen wrote:
> 
>> Maybe use "iaSender.getassistivecaption()" instead?
> 
> ;-) Yes, thanks but... does it search for frame.Caption or hint too ? (I 
> know, I am insupportable.)
> 
Sure. The purpose of iassistiveclient is to provide the assistive server
with the needed information without the requirement that the server must
know the actual widget.
"
function twidget.getassistivecaption(): msestring;
begin
 if fframe <> nil then begin
  result:= fframe.getassistivecaption();
 end
 else begin
  result:= '';
 end;
end;

function tcustomcaptionframe.getassistivecaption(): msestring;
begin
 result:= getcaption();
end;

function tmenuitem.getassistivecaption(): msestring;
var
 item1: tmenuitem;
begin
 if getactiveitem(item1) then begin
  result:= item1.finfo.captiontext;
 end
 else begin
  result:= '';
 end;
end;

function tcustombutton.getassistivecaption(): msestring;
begin
 if factioninfo.captiontext <> '' then begin
  result:= factioninfo.captiontext;
 end
 else begin
  result:= inherited getassistivecaption();
 end;
end;

function tcustomtabbar.getassistivecaption(): msestring;
begin
 with flayoutinfo do begin
  if (focusedtab >= 0) and (focusedtab < tabs.count) then begin
   result:= tabs[focusedtab].caption;
  end
  else begin
   result:= inherited getassistivecaption();
  end;
 end;
end;
"

 Please remember the signature of "iassistiveclient":
"
 assistiveflagty =
(asf_embedded,asf_grid,asf_gridcell,asf_datetime,asf_menu);
 assistiveflagsty = set of assistiveflagty;

 iassistiveclient = interface(inullinterface)[miid_iassistiveclient]
  function getinstance: tobject;
  function getassistivename(): msestring;
  function getassistivecaption(): msestring;
  function getassistivetext(): msestring;
  function getassistivecaretindex(): int32; //-1 -> none
  function getassistivehint(): msestring;
  function getassistiveflags(): assistiveflagsty;
 {$ifdef mse_with_ifi}
  function getifidatalinkintf(): iifidatalink; //can be nil
 {$endif}
 end;
"

Martin

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to