void CScrollBarWindow::_SetScrollInfo(_In_ CScrollInfo *lpsi) { _scrollInfo = *lpsi; BOOL isEnable = (_scrollInfo.nMax > _scrollInfo.nPage); _Enable(isEnable); _scrollDir = SCROLL_NONE_DIR; _SetCurPos(_scrollInfo.nPos, -1); }
/* Channels configuration generated by customiser */ static `$channelsConfig` /******************************************************************************* * Function Name: `$INSTANCE_NAME`_Start ******************************************************************************** * * Summary: * Performs all required initialization for this component * and enables the power. The power will be set to the appropriate * power based on the clock frequency. * * Parameters: * None. * * Return: * None. * * Global variables: * The `$INSTANCE_NAME`_initVar variable is used to indicate when/if initial * configuration of this component has happened. The variable is initialized to * zero and set to 1 the first time ADC_Start() is called. This allows for * component Re-Start without re-initialization in all subsequent calls to the * `$INSTANCE_NAME`_Start() routine. * If re-initialization of the component is required the variable should be set * to zero before call of `$INSTANCE_NAME`_Start() routine, or the user may call * `$INSTANCE_NAME`_Init() and `$INSTANCE_NAME`_Enable() as done in the * `$INSTANCE_NAME`_Start() routine. * *******************************************************************************/ void `$INSTANCE_NAME`_Start(void) { /* If not Initialized then initialize all required hardware and software */ if(`$INSTANCE_NAME`_initVar == 0u) { `$INSTANCE_NAME`_Init(); `$INSTANCE_NAME`_initVar = 1u; } `$INSTANCE_NAME`_Enable(); }
bool STREAM::SetFlag(int flag, int value) { return _Enable(flag, true, !!value); }
bool STREAM::Disable(int flag) { return _Enable(flag, true, false); }
bool STREAM::Enable(int flag) { return _Enable(flag, true, true); }
bool STREAM::IsEnabled(int flag) { return _Enable(flag, false, false); }