OPTION ocx_b - v14


 

CONTROL 320 - ActiveX OCX

 

type:                            320

 

parent:                       panel (Row Column)

 

TAB file entry:          opt,x,y,w,h,f,b,320,'text':;

 

Notes

This button 320 adds a very powerful capability to Eagle.  This button type, OCX_B, type=320, enables the installation of an OCX inside a panel.  You can then operate on through macro stubs using the same methodology used with  “Activex” gwindows.

 

This image illustrates the possibilities where we can have ActiveX/OCX in a GWINDOW, in a PANEL and in a docked dialog.

Eagle instructs an ActiveX through macro stubs which are automatically generated by the Activex2Eagle compiler, the ActiveX interacts with Eagle through the Eagle EPIs.

 

In the docked dialog above for example, the following TAB file has been loaded:

 

55,2,8,200,280,0,0,320,'OWC11.Spreadsheet.11':;

00,0,0,16,0,0,0,888,'Arial':;

01,2,310,260,24,0,0,5,'OCC ActiveX as Button 56':;

56,2,334,260,360,0,0,320,'OPENCASCADEACTIVEX.OpenCascadeActiveXCtrl.1':;

57,94,696,32,32,0,0,4,'\LocalRepository\MacroVision\EagleV12\ActivexOCC\se80.bmp': do show(1)

58,128,696,32,32,0,0,4,'\LocalRepository\MacroVision\EagleV12\ActivexOCC\se8.bmp': do show(0)

59,162,696,32,32,0,0,4,'\LocalRepository\MacroVision\EagleV12\ActivexOCC\se17.bmp': do rotate

60,196,696,32,32,0,0,4,'\LocalRepository\MacroVision\EagleV12\ActivexOCC\se4.bmp': do zoom

61,230,696,32,32,0,0,4,'\LocalRepository\MacroVision\EagleV12\ActivexOCC\se15.bmp': do zoomall

 

The two ActiveX components are loaded, the first is Excel and the second a client ActiveX we developed starting from the OCC ImportExport sample.  

 

The PANEL is created as usual and the actions associated to the lower buttons, which instruct the OCX can be  something like:

 

{

string s1

numeric ians

# call the DoRotate stubs

pat C:\LocalRepository\MacroVision\EagleV14\ActivexOCC

ians=(88*2**8)+56

do stubs/DoRotation(ians,@s1)

pat C:\LocalRepository\MacroVision\EagleV14\ActivexOCC

}

 

The DoRotation in this case is an exported method of the ActiveX.  Of course this is not the limit of the functionality as can be imagined the possibilities are unlimited.  

See also

panel, options, Integrating Components, UI Framework, Theme