HookPoint Interface (old)
Return to Introduction  Previous page  Next page

*** This is an old interface that is currently retained for backward compatibility and will eventually be phased out in a future release of the OpenUI. It is in your best interest to convert any existing code over to the new OpenObjects interface.

These one required function that must be added to your modules:

·OUI_Extension2()  

There are also a number of utility functions that you can call to handle registering/unregistering your hook points. These functions include:

·OUI_Clear_Extensions()  
·OUI_Register_Extension()  
·OUI_Register_Extensions()  
·OUI_Register_SubExtension()  
·OUI_Register_Vendor() (compiled only)  

Typically, you'll setup an OUI_Install() and an OUI_Uninstall() functions into your modules. A typical example would look like this:

OUI_Install

<MvFUNCTION NAME = "OUI_Install" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "syntax, expression">  
   <MvASSIGN NAME = "l.modcode"   VALUE = "{ Module_Code() }">  
   <MvASSIGN NAME = "l.save_mod"   VALUE = "{ Modules.d.id }">  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(Stores.d.ui_id) }">  
   <MvIF EXPR = "{ l.ok }">  
      <MvIF EXPR = "{ substring(Modules.d.code, 1, 6) EQ 'OPENUI' }">  
         <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.trash" VALUE = "{ OUI_Register_Extension(l.modcode, 1, '------------------------------------------*') }">  
         <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.trash" VALUE = "{ OUI_Register_Extension(l.modcode, 21, '--*') }">  
      </MvIF>  
   </MvIF>  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(l.save_mod) }">  
 
   <MvFUNCRETURN VALUE = "{ l.ok }">  
</MvFUNCTION>  

OUI_Uninstall

<MvFUNCTION NAME = "OUI_Uninstall" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "syntax, expression">  
   <MvASSIGN NAME = "l.modcode"   VALUE = "{ Module_Code() }">  
   <MvASSIGN NAME = "l.save_mod"   VALUE = "{ Modules.d.id }">  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(Stores.d.ui_id) }">  
   <MvIF EXPR = "{ l.ok }">  
      <MvIF EXPR = "{ substring(Modules.d.code, 1, 6) EQ 'OPENUI' }">  
         <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.trash" VALUE = "{ OUI_Register_Extension(l.modcode, 1, '') }">  
         <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.trash" VALUE = "{ OUI_Register_Extension(l.modcode, 21, '') }">  
      </MvIF>  
   </MvIF>  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(l.save_mod) }">  
 
   <MvFUNCRETURN VALUE = "{ l.ok }">  
</MvFUNCTION>  

In both examples, they look up the OpenUI Look & Feel module, and then registers hook points (or unregisters hook points).

 


Send feedback on this documentation.
© 2004 - 2000 Darren Ehlers & OpenUI Developer Consortium