Beispiel #1
0
/*
   =============
   Undo_SetMaxMemorySize
   =============
 */
void Undo_SetMaxMemorySize( int size ){
	Undo_Clear();
	if ( size < 1024 ) {
		g_undoMaxMemorySize = 1024;
	}
	else{g_undoMaxMemorySize = size; }
}
Beispiel #2
0
/*
   =============
   Undo_SetMaxSize
   =============
 */
void Undo_SetMaxSize( int size ){
	Undo_Clear();
	if ( size < 1 ) {
		g_undoMaxSize = 1;
	}
	else{g_undoMaxSize = size; }
}
Beispiel #3
0
/*
 * InitControlValues() -
 */
void sd_InitControlValues(HWND sysDlg)
{
    _TUCHAR startupMsg[16];
    UINT ctrlID;
    HWND ctrl;
    int i;
    int index;

    /*
     * Startup message LCD.
     */
    FromAnsiNCopy(startupMsg, &sd_data[TX81Z_SYS_STARTUP_MSG], 16);
    LcdCtrl_SetText(GetDlgItem(sysDlg, IDC_STARTUP_MSG), startupMsg);
    /*
     * Init numeric LCD's.
     */
    for (i = 0; i < sd_numLcdInitCnt; i++) {
        ctrlID = sd_numLcdInits[i].ctrlID;
        ctrl = GetDlgItem(sysDlg, ctrlID);
        LcdCtrl_SetValue(ctrl, sd_data[ctrlID - SYS_ID_OFFSET]);
    }
    /*
     * Init special LCD's
     */
    for (i = 0; i < sd_specialLcdInitCnt; i++) {
        ctrlID = sd_specialLcdInits[i].ctrlID;
        ctrl = GetDlgItem(sysDlg, ctrlID);
        LcdCtrl_SetValue(ctrl, sd_data[ctrlID - SYS_ID_OFFSET]);
    }
    /*
     * Toggle buttons
     */
    for (i = 0; i < sd_toggleInitCnt; i++) {
        BOOL btnOn;

        /*
         * Get the ID of the next control.
         */
        ctrlID = sd_toggleInits[i].ctrlID;
        /*
         * Get the status of the button from the snapshot data.
         */
        index = ctrlID - SYS_ID_OFFSET;
        btnOn = sd_data[index] != 0;
        /*
         * Set the checked status of the button.
         */
        ctrl = GetDlgItem(sysDlg, ctrlID);
        Button_SetCheck(ctrl, btnOn);
        Button_SetText(ctrl, btnOn ? sd_toggleInits[i].modeOn
                : sd_toggleInits[i].modeOff);
    }
    sd_dirty = FALSE;
    Undo_Clear(sd_undo);
    sd_undoGroup = TRUE;
    MenuItem_Disable(sd_menu, IDM_UNDO);
    MenuItem_Disable(sd_menu, IDM_REDO);
}
Beispiel #4
0
/*
=============
Undo_SetMaxSize
=============
*/
void Undo_SetMaxSize(int size)
{
	Undo_Clear();
	if (size < 1) g_undoMaxSize = 1;
	else g_undoMaxSize = size;
}