Exemplo n.º 1
0
const char *MCPrinter::ChoosePaper(bool p_window_modal)
{
    if (MCsystemFS && MCscreen -> hasfeature(PLATFORM_FEATURE_OS_PRINT_DIALOGS))
    {
        Window t_owner;
        t_owner = MCModeGetParentWindow();

        switch(DoPageSetup(p_window_modal, t_owner))
        {
        case PRINTER_DIALOG_RESULT_CANCEL:
            return "cancel";
            break;

        case PRINTER_DIALOG_RESULT_ERROR:
            return "unable to open dialog";
            break;

        case PRINTER_DIALOG_RESULT_OKAY:
            return NULL;
        }
    }
    else
        return "non-system page setup dialogs not supported";

    return NULL;
}
Exemplo n.º 2
0
void CPrintAttachment::ExecuteSelf(MessageT inMessage, void *ioParam)
{
	mExecuteHost = true;

	if (inMessage == msg_CommandStatus) {
		SCommandStatus	*status = (SCommandStatus *)ioParam;
		if (status->command == cmd_Print) {
			*status->enabled = true;
			*status->usesMark = false;
			mExecuteHost = false; // we handled it
		}
		else if (status->command == cmd_PageSetup) {
			*status->enabled = true;
			*status->usesMark = false;
			mExecuteHost = false; // we handled it
		}
	}
	else if (inMessage == cmd_Print) {
	    DoPrint();
	    mExecuteHost = false; // we handled it
	}
	else if (inMessage == cmd_PageSetup) {
	    DoPageSetup();
	    mExecuteHost = false; // we handled it
	}
}
Exemplo n.º 3
0
void
CAPrintingAttachment::ExecuteSelf(
	MessageT	inMessage,
	void*		ioParam)
{

	// Validate pointers.

	ValidateThis_();

	// Common initialization & sanity check.

	SetExecuteHost(true);
	
	// Dispatch event.
	
	switch (inMessage) {
	
		case msg_CommandStatus:
			FindCommandStatus((SCommandStatus*) ioParam);
			break;
		
		case cmd_PageSetup:
			DoPageSetup();
			SetExecuteHost(false);
			break;

		case cmd_Print:
			DoPrint();
			SetExecuteHost(false);
			break;

		case cmd_PrintOne:
			DoPrintOne();
			SetExecuteHost(false);
			break;

	}
}