Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::intershell Namespace

A Simple Button 

This simple button, when clicked will show a message box indicating that the button was clicked. For button controls there is a default configuration dialog that is used for controls that do not themselves define a OnConfigureControl(OnEditControl) event handler. The default dialog, depending on its current design is able to set all relavent properties common to buttons, such as colors, font, button style, perhaps a page change indicator. 

 

 

       
       
OnCreateMenuButton( “basic/Hello World” )( PMENU_BUTTON button )
{
    return 1; // result OK to create.
}
       
OnKeyPressEvent( “basic/Hello World” )( PTRSZVAL psvUnused )
{
    SimpleMessageBox( NULL  // the parent frame, NULL is okay
                    , “Hello World!”   // the message within the message box
                    , “Button Clicked” );  // the title of the message box.
    // SimpleMessageBox displays a simple frame with a message
    // and a title, and an OK button. The function waits
    // until the OK button is clicked before returning.
}
       
       

 

A Simple Listbox 

 

OnCreateListbox( “basic/List Test” )( PSI_CONTROL pc_list )
{
      return pc_list; // result non-zero OK to create.
      // this result can also be used in subsequent events
// by typecasting it back to the original PSI_CONTROL
// type that it is.
}
       
       
       

// several implementations of listboxes change their content 

based on the state of other controls around them, and/or 

database content. The OnShowControl is a convenient place 

to re-populate the listbox with new data. 

There is no requirement to do this in this way. 

Some listboxes may populate their content during OnCreate. 

 

       
OnShowControl( “basic/List Test” )( PTRSZVAL psvList )
{
      PSI_CONTROL pc_list = (PSI_CONTROL)psvList;
      ResetList( pc_list );
      AddListItem( pc_list, “One List Item” );
      AddListItem( pc_list, “Another List Item” );
}
       
       
       
       
       
       
       
       
       
A Simple Control
       
       
       
There is no such thing as a ‘simple’ control.
       
       
       
OnCreateControl( “basic/Other Control” )( PSI_CONTROL frame, S_32 x, S_32 y, _32 w, _32 h )
       
{
      // this code results with a create PSI control.
      // the PSI control must have been previously registered
      // or defined in some way.
      // the result of creating an invalid control,
// or of creating a control that fails creation
// for one reason or another is NULL, which will in turn
// fails creation of the MILK control.
       
      return (PTRSZVAL)MakeNamedControl( frame
              , “Some PSI Control type-name”
              , x, y  // control position passed to event
              , w, h  // control size passed to event
              , -1 ); // control ID; typically unused.
}
       
       
       
// For MILK to be able to hide the control when pages change,
// show the control when pages change, move the control to
// a new position, or to resize the control, this method MUST
// be defined for MILK widgets created through OnCreateControl.
       
       
       
OnQueryGetControl( PTRSZVAL psv )
{
      // since we know that we returned a PSI_CONTROL from the
      // creation event, this can simply be typecast and returned.
      return (PSI_CONTROL)psv;
}
Name 
Description 
The following table lists functions in this documentation. 
The following table lists structs, records, enums in this documentation. 
The following table lists types in this documentation. 
The following table lists macros in this documentation. 
 
Name 
Description 
 
This is function sack::intershell::AddButtonLayout. 
 
LOAD SAVE Stuff 
 
BeginSubConfiguration.... colntrol_type_name is a InterShell widget path/name for the type of other info to save... the method for setting additional configuration methods is invoked by thisname. Then end_type_name is the last string which will close the subconfiguration. 
 
This is function sack::intershell::ClearPageList. 
 
depricated - used for forward migration... 
 
This is function sack::intershell::CreateLabelVariable. 
 
This is function sack::intershell::CreateLabelVariableEx. 
 
This is function sack::intershell::EscapeMenuString. 
 
magically knows which button we're editing at the moment. intended to only be used during OnEditControl() Event Handler 
 
 
 
This is function sack::intershell::HidePageExx. 
 
This is function sack::intershell::InterShell_AddCommonButtonConfig. 
 
INTERSHELL_PROC( void, InterShell_SetButtonAnimation )( PMENU_BUTTON button, CTEXTSTR name ); 
 
This is function sack::intershell::InterShell_CommonImageUnloadByImage. 
 
This is function sack::intershell::InterShell_CommonImageUnloadByName. 
 
This is function sack::intershell::InterShell_CreateControl. 
 
This is function sack::intershell::InterShell_CreateSomeControl. 
 
this sets a one time flag on a button which disables the auto page change which may be assigned to a button. tend/issue/perform these types of verbs may fail, and this is the only sort of thing at the moment that happens... perhaps renaming this to button_abort_function could be done? 
 
disable updates on the page, disable updating of buttons... 
 
This is function sack::intershell::InterShell_GetButtonColors. 
 
this provides low level access to a button, let the programmer beware. 
 
This is function sack::intershell::InterShell_GetButtonHighlight. 
 
This is function sack::intershell::InterShell_GetButtonText. 
 
might get a seperate canvas per page if it's opened in multi-frame mode. otherwise pass NULL to get the default canvas 
 
actual worker function for InterShell_GetLabelText - but suport dispatch to bProcControlEx 
 
This is function sack::intershell::InterShell_GetCurrentConfigHandler. 
 
This is function sack::intershell::InterShell_GetCurrentLoadingControl. 
 
This is function sack::intershell::InterShell_GetCurrentlyCreatingButton. 
 
text_label.h 
 
This is function sack::intershell::InterShell_GetPhysicalButton. 
 
This is function sack::intershell::InterShell_GetSystemName. 
 
local export to allow exxternal plugins to control whether the main display is showing... (specially for Tasks at this time... when an exclusive task is launched, display is hidden) 
 
return if the button is just virtual (part of a macro) 
 
This is function sack::intershell::InterShell_Reveal. 
 
This is function sack::intershell::InterShell_SaveCommonButtonParameters. 
 
This is function sack::intershell::InterShell_SetButtonColor. 
 
This is function sack::intershell::InterShell_SetButtonColors. 
 
This is function sack::intershell::InterShell_SetButtonFont. 
 
This is function sack::intershell::InterShell_SetButtonHighlight. 
 
This is function sack::intershell::InterShell_SetButtonImage. 
 
For InterShell_SetButtonImageAlpha..... 0 is no alpha change. alpha < 0 increases transparency alpha > 0 increases opacity. Max value is +/-255 
 
THis function returns the font of the current button being edited... this result can be used for controls that are not really buttons to get the common properties of the font being used for this control... 
 
This is function sack::intershell::InterShell_SetButtonText. 
 
width/height, x/y 
 
use of this is preferred, otherwise thread conflicts will destroy the buffer. 
 
This is function sack::intershell::InterShell_TranslateLabelTextEx. 
 
update any labels which are using this variable. 
 
update any labels which are using this variable. list of PVARIABLE types 
 
wake up menu processing... there's a flag that was restart that this thinks it might want... 
 
This is function sack::intershell::RestoreCurrentPage. 
 
This is function sack::intershell::ResumeMenu. 
 
This is function sack::intershell::SaveCanvasConfiguration. 
 
This is function sack::intershell::SaveCanvasConfiguration_XML. 
 
FONTS 
 
layout members which have a position x, y, font, text and color of their own may be created on buttons. They are displayed below the lense/ridge[up/down] and above the background. 
 
magically knows which button we're editing at the moment. intended to only be used during OnEditControl() Event Handler 
 
a call will push the current page on a stack which will be returned to if returncurrentpage is used. clear page list will flush the stack cause there is such a temptation to call to all pages, providing near inifinite page recall (back back back) 
 
This is function sack::intershell::ShellCallSetCurrentPageEx. 
 
This is function sack::intershell::ShellGetCurrentPage. 
 
pages controls here... 
 
pass pc NULL defaults internally to using the main frame surface. The page name returns the current page of that name. 
 
This is function sack::intershell::ShellReturnCurrentPage. 
 
special names start, next, prior are keywords that imply direct page stacking. 
 
This is function sack::intershell::ShellSetCurrentPageEx. 
 
INTERSHELL_PROC( void, UpdateButtonEx )( PMENU_BUTTON button, int bEndingEdit ); 
 
This is function sack::intershell::UseAFont. 
Name 
Description 
okay transparent level 1 red is disable key. - cause that's such a useful color alone. A Special color symbol used to pass to InterShell_ SetButtonColors which causes the color to remain whatever it was, ignore any change. 
This is macro sack::intershell::COLOR_IGNORE. 
This is macro sack::intershell::ENDALL_REGISTERED. 
This is macro sack::intershell::EndSecurityContext. 
fixup button has been depricated for external usage please use UpdateButton instead. (which does also invoke fixup) UpdateButton INTERSHELL_PROC( void, FixupButtonEx )( PMENU_BUTTON button DBG_PASS); 
GETALL_REGISTERED( WIDE("issue_pos/common/common_config") ) 
This is macro sack::intershell::HidePageEx. 
Pointer to the basic control that InterShell uses to track controls on pages. This is given to a plugin when a control is created, and the control should just treat this as a handle and use proper interface methods with intershell.core to get information. 
This is macro sack::intershell::OnChangePage. 
Event handler invoked when a control is cloned (using existing interface) static void OnCloneControl( WIDE( "blah" ) )( PTRSZVAL psvControlThatIsNewClone, PTRSZVAL psvControlThatIsBeingCloned ) 
This is macro sack::intershell::OnConfigureControl. 
Method invoked when a control is selected and a copy operation invoked. New method requires 'static <return type>' to be applied... static void OnCopyControl( "blah" )( PTRSZVAL psvYourControl ); 
parametrs to this are the parent control, x, y, width and height 
This is macro sack::intershell::OnCreateListbox. 
OnCreateMenuButton(name)(PMENU_BUTTON button ) { /*create button data*/ 
This is macro sack::intershell::OnDestroyControl. 
This is macro sack::intershell::OnDestroyListbox. 
This is macro sack::intershell::OnDestroyMenuButton. 
This is macro sack::intershell::OnDoubleSelectListboxItem. 
This is macro sack::intershell::OnDropAccept. 
This is macro sack::intershell::OnEditBegin. 
This is macro sack::intershell::OnEditControl. 
This is macro sack::intershell::OnEditEnd. 
This is macro sack::intershell::OnEditModeBegin. 
This is macro sack::intershell::OnEditModeEnd. 
Intended use:edits properties regarding page security... OnPageChange return FALSE to disallow page change... 
This is macro sack::intershell::OnEditSecurityContext. 
invoked when ALL initialzation is run, just after the menu is shown. (tasks, first load) 
invoked when all other initization is done, and before the main applciation actually runs and displays stuff. 
This is macro sack::intershell::OnFixupControl. 
This is macro sack::intershell::OnFixupMenuButton. 
This is macro sack::intershell::OnGetControl. 
passed the PSI_CONTROL of the menu canvas, used to give the control the parent to display its frame against. may also be used to get the current page. 
This is macro sack::intershell::OnHideControl. 
This is macro sack::intershell::OnInterShellShutdown. 
This is macro sack::intershell::OnLoad. 
This is macro sack::intershell::OnLoadCommon. 
This is macro sack::intershell::OnLoadControl. 
This is macro sack::intershell::OnLoadSecurityContext. 
Method invoked when a control is selected and a paste operation invoked. New method requires 'static <return type>' to be applied... static void OnPasteControl( WIDE( "blah" ) )( PTRSZVAL psvYourControl ); 
return TRUE/FALSE whether the control should be shown, else it remains hidden. this method is used both with MenuButton and Control. This is called after FixupButton(on MenuButtonOnly) and EndEdit( on Controls and MenuButtons ) this is called during RestorePage(Full), which is used by ChangePage() after HidePage(). 

  • this is depreicated, buttons shouldn't really HAVE to know the button they are...

*
#define OnSaveMenuButton(name) DefineRegistryMethod(TASK_PREFIX,SaveButton,WIDE( "control" ),name,WIDE( "button_save" ),void,(FILE*,PMENU_BUTTON,PTRSZVAL)) #define OnSaveCommon OnSaveMenuButton 

This is macro sack::intershell::OnSaveCommon. 
This is macro sack::intershell::OnSaveControl. 
this method is depricated also, and will soon be obsolete.... perfer usage of OnSave and OnLoad for further development 
handler to catch event of when a page is saved. The currnet ppage_data is passed as a convenience 
This is macro sack::intershell::OnSaveSecurityContext. 
This is macro sack::intershell::OnSaveXMLPage. 
This is macro sack::intershell::OnSelectListboxItem. 
things like clock can do a clock unlock things like lists can requery databases to show new items.... 
result INVALID_INDEX - premission denied result 0 - no context any other result is a result handle that is also closed when complete 
define UpdateButtonEx( button, edit ) UpdateButtonExx( button, edit DBG_SRC
This is macro sack::intershell::UpdateButtonEx. 
 
Name 
Description 
 
struct intershell_interface 
 
moved from text_label.h these values need to be exposed to peer modules

This enumeration defines values used in CreateLabelVariable and CreateLabelVariableEx
Name 
Description 
This is the type of the variable expected if a label is created with LABEL_TYPE_PROC. 
This is the type of the variable expected if a label is created with LABEL_TYPE_PROC_CONTROL_EX. 
This is the type of the variable expected if a label is created with LABEL_TYPE_PROC_EX. 
This is the type of the variable expected if a label is created with LABEL_TYPE_INT. 
This is the type of the variable expected if a label is created with LABEL_TYPE_STRING. 
this is the type of function to pass LABEL_TYPE_VALUE_STRING 
A named font preset. The font may be extracted from this at any given time, but internally handles scaling of the font to match the one-size fits all. 
This is type sack::intershell::PMENU_BUTTON. 
An abstract type used to point to a Page. A canvas manages a list of pages that will show at any given time one of. 
label is actually just a text label thing... It's only known about internally, so it's better to use the function for translating label text which takes your menu button control container. 
Dynamic variable declaration - used within button/text_label contexts... 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!