*/ void Trap_Port(REBCNT errnum, REBSER *port, REBINT err_code) /* ***********************************************************************/ { REBVAL *spec = OFV(port, STD_PORT_SPEC); REBVAL *val; if (!IS_OBJECT(spec)) Trap0(RE_INVALID_PORT); val = Get_Object(spec, STD_PORT_SPEC_HEAD_REF); // most informative if (IS_NONE(val)) val = Get_Object(spec, STD_PORT_SPEC_HEAD_TITLE); DS_PUSH_INTEGER(err_code); Trap2(errnum, val, DS_TOP); }
void Process_TP_Press(unsigned int X, unsigned int Y) { exec_cimage = 0; exec_box = 0; Get_Object(X, Y); if (_object_count != -1) { if (_object_count == cimage_order) { if (exec_cimage->Active == 1) { if (exec_cimage->OnPressPtr != 0) { exec_cimage->OnPressPtr(); return; } } } if (_object_count == box_order) { if (exec_box->Active == 1) { if (exec_box->OnPressPtr != 0) { exec_box->OnPressPtr(); return; } } } } }
static void Process_TP_Press(unsigned int X, unsigned int Y) { Get_Object(X, Y); if (_object_count != -1) { } }
static void Process_TP_Down(unsigned int X, unsigned int Y) { object_pressed = 0; Get_Object(X, Y); if (_object_count != -1) { } }
static void Process_TP_Up(unsigned int X, unsigned int Y) { Get_Object(X, Y); if (_object_count != -1) { } PressedObject = 0; PressedObjectType = -1; }
void Process_TP_Up(unsigned int X, unsigned int Y) { switch (PressedObjectType) { // Box case 6: { if (PressedObject != 0) { exec_box = (TBox*)PressedObject; if ((exec_box->PressColEnabled == 1) && (exec_box->OwnerScreen == CurrentScreen)) { DrawBox(exec_box); } break; } break; } } exec_cimage = 0; Get_Object(X, Y); if (_object_count != -1) { // CImages if (_object_count == cimage_order) { if (exec_cimage->Active == 1) { if (exec_cimage->OnUpPtr != 0) exec_cimage->OnUpPtr(); if (PressedObject == (TPointer)exec_cimage) if (exec_cimage->OnClickPtr != 0) exec_cimage->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } // Boxes if (_object_count == box_order) { if (exec_box->Active == 1) { if (exec_box->OnUpPtr != 0) exec_box->OnUpPtr(); if (PressedObject == (TPointer)exec_box) if (exec_box->OnClickPtr != 0) exec_box->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } } PressedObject = 0; PressedObjectType = -1; }
static void Process_TP_Down(unsigned int X, unsigned int Y) { object_pressed = 0; exec_button = 0; exec_image = 0; exec_radio_button = 0; Get_Object(X, Y); if (_object_count != -1) { if (_object_count == button_order) { if (exec_button->Active == 1) { if (exec_button->PressColEnabled == 1) { object_pressed = 1; DrawButton(exec_button); } PressedObject = (void *)exec_button; PressedObjectType = 0; if (exec_button->OnDownPtr != 0) { exec_button->OnDownPtr(); return; } } } if (_object_count == image_order) { if (exec_image->Active == 1) { PressedObject = (void *)exec_image; PressedObjectType = 3; if (exec_image->OnDownPtr != 0) { exec_image->OnDownPtr(); return; } } } if (_object_count == radio_button_order) { if (exec_radio_button->Active == 1) { if (exec_radio_button->PressColEnabled == 1) { object_pressed = 1; DrawRadioButton(exec_radio_button); } PressedObject = (void *)exec_radio_button; PressedObjectType = 17; if (exec_radio_button->OnDownPtr != 0) { exec_radio_button->OnDownPtr(); return; } } } } }
void Process_TP_Down(unsigned int X, unsigned int Y) { object_pressed = 0; exec_round_button = 0; exec_label = 0; exec_image = 0; Get_Object(X, Y); if (_object_count != -1) { if (_object_count == round_button_order) { if (exec_round_button->Active != 0) { if (exec_round_button->PressColEnabled != 0) { object_pressed = 1; DrawRoundButton(exec_round_button); } PressedObject = (void *)exec_round_button; PressedObjectType = 1; if (exec_round_button->OnDownPtr != 0) { exec_round_button->OnDownPtr(); return; } } } if (_object_count == label_order) { if (exec_label->Active != 0) { PressedObject = (void *)exec_label; PressedObjectType = 2; if (exec_label->OnDownPtr != 0) { exec_label->OnDownPtr(); return; } } } if (_object_count == image_order) { if (exec_image->Active != 0) { PressedObject = (void *)exec_image; PressedObjectType = 3; if (exec_image->OnDownPtr != 0) { exec_image->OnDownPtr(); return; } } } } }
static void Process_TP_Press(unsigned int X, unsigned int Y) { exec_button = 0; exec_image = 0; exec_radio_button = 0; Get_Object(X, Y); if (_object_count != -1) { if (_object_count == button_order) { if (exec_button->Active == 1) { if (exec_button->OnPressPtr != 0) { exec_button->OnPressPtr(); return; } } } if (_object_count == image_order) { if (exec_image->Active == 1) { if (exec_image->OnPressPtr != 0) { exec_image->OnPressPtr(); return; } } } if (_object_count == radio_button_order) { if (exec_radio_button->Active == 1) { if (exec_radio_button->OnPressPtr != 0) { exec_radio_button->OnPressPtr(); return; } } } } }
void Process_TP_Down(unsigned int X, unsigned int Y) { object_pressed = 0; exec_cimage = 0; exec_box = 0; Get_Object(X, Y); if (_object_count != -1) { if (_object_count == cimage_order) { if (exec_cimage->Active == 1) { PressedObject = (TPointer)exec_cimage; PressedObjectType = 11; if (exec_cimage->OnDownPtr != 0) { exec_cimage->OnDownPtr(); return; } } } if (_object_count == box_order) { if (exec_box->Active == 1) { if (exec_box->PressColEnabled == 1) { object_pressed = 1; DrawBox(exec_box); } PressedObject = (TPointer)exec_box; PressedObjectType = 6; if (exec_box->OnDownPtr != 0) { exec_box->OnDownPtr(); return; } } } } }
void Process_TP_Press(unsigned int X, unsigned int Y) { exec_round_button = 0; exec_label = 0; exec_image = 0; Get_Object(X, Y); if (_object_count != -1) { if (_object_count == round_button_order) { if (exec_round_button->Active != 0) { if (exec_round_button->OnPressPtr != 0) { exec_round_button->OnPressPtr(); return; } } } if (_object_count == label_order) { if (exec_label->Active != 0) { if (exec_label->OnPressPtr != 0) { exec_label->OnPressPtr(); return; } } } if (_object_count == image_order) { if (exec_image->Active != 0) { if (exec_image->OnPressPtr != 0) { exec_image->OnPressPtr(); return; } } } } }
static void Process_TP_Up(unsigned int X, unsigned int Y) { switch (PressedObjectType) { // Button case 0: { if (PressedObject != 0) { exec_button = (TButton*)PressedObject; if ((exec_button->PressColEnabled == 1) && (exec_button->OwnerScreen == CurrentScreen)) { DrawButton(exec_button); } break; } break; } // RadioButton case 17: { if (PressedObject != 0) { exec_radio_button = (TRadioButton*)PressedObject; if ((exec_radio_button->PressColEnabled == 1) && (exec_radio_button->OwnerScreen == CurrentScreen)) { DrawRadioButton(exec_radio_button); } break; } break; } } exec_image = 0; Get_Object(X, Y); if (_object_count != -1) { // Buttons if (_object_count == button_order) { if (exec_button->Active == 1) { if (exec_button->OnUpPtr != 0) exec_button->OnUpPtr(); if (PressedObject == (void *)exec_button) if (exec_button->OnClickPtr != 0) exec_button->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } // Images if (_object_count == image_order) { if (exec_image->Active == 1) { if (exec_image->OnUpPtr != 0) exec_image->OnUpPtr(); if (PressedObject == (void *)exec_image) if (exec_image->OnClickPtr != 0) exec_image->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } // RadioButtons if (_object_count == radio_button_order) { if (exec_radio_button->Active == 1) { if (exec_radio_button->OnUpPtr != 0) exec_radio_button->OnUpPtr(); if (PressedObject == (void *)exec_radio_button) if (exec_radio_button->OnClickPtr != 0) exec_radio_button->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } } PressedObject = 0; PressedObjectType = -1; }
void Process_TP_Up(unsigned int X, unsigned int Y) { switch (PressedObjectType) { // Round Button case 1: { if (PressedObject != 0) { exec_round_button = (TButton_Round*)PressedObject; if ((exec_round_button->PressColEnabled != 0) && (exec_round_button->OwnerScreen == CurrentScreen)) { DrawRoundButton(exec_round_button); } break; } break; } } exec_label = 0; exec_image = 0; Get_Object(X, Y); if (_object_count != -1) { // Buttons with Round Edges if (_object_count == round_button_order) { if (exec_round_button->Active != 0) { if (exec_round_button->OnUpPtr != 0) exec_round_button->OnUpPtr(); if (PressedObject == (void *)exec_round_button) if (exec_round_button->OnClickPtr != 0) exec_round_button->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } // Labels if (_object_count == label_order) { if (exec_label->Active != 0) { if (exec_label->OnUpPtr != 0) exec_label->OnUpPtr(); if (PressedObject == (void *)exec_label) if (exec_label->OnClickPtr != 0) exec_label->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } // Images if (_object_count == image_order) { if (exec_image->Active != 0) { if (exec_image->OnUpPtr != 0) exec_image->OnUpPtr(); if (PressedObject == (void *)exec_image) if (exec_image->OnClickPtr != 0) exec_image->OnClickPtr(); PressedObject = 0; PressedObjectType = -1; return; } } } PressedObject = 0; PressedObjectType = -1; }