Jump to content

Vadim1980

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Vadim1980

  1. Thanks. I tryed the demo with domo font and it works, but when I choose another 1251 font I got wrong symbols. Did you know how to fix that, or how to choose correct font that will be good for convertation? I add my test font to the message. Thank you for helping... centurygothic.ttf
  2. I trying to use in my home project cyrilic font, but its not work for me. Is somebody explain me how to use such font by view words? - What font I have to use for this. - I have to #define MF_ENCODING MF_ENCODING_ASCII ---- Something wrong with my project or settings and library shows bugs on the screan and not latter
  3. I want to clarify. I have to make Container with bigger size and change position for every component, which belongs to Container, with command gwinMove? Or I have to move container and all his children should be moved automatically?
  4. Thank you, I am already use it. But I want to use Lable with TextEdit like List Item element, may by later I will try to make it but now I try to use container
  5. I have only 4 string in my display and I want to use one screan for all my settings. So, if edit is out of vissible area, container can scroll to require component throw set focus command.
  6. Is it possible to see a code of the utility, wich generates a font *.c file?
  7. //============================================= //In the main.c //============================================= void GfxTestTask(void *pvParameters) { GEvent *pe; gFont wFont; gfxInit(); // Set the widget defaults wFont = gdispOpenFont(fontName); //GOST_UI_215 gwinSetDefaultFont(wFont); //"UI2" gwinSetDefaultStyle(&CustomWidgetStyle, gFalse); GHandle ghEdit1 = createEditTextKey4x5("Edit1_4x5", 180, 22, 60, 20, 16); ghList1 = createListCheckbox("List1Checkbox", 64, 2, 110, 61); gwinAttachToggle(ghList1, 0, 1);//down //2 gwinAttachToggle(ghList1, 1, 2);//up //4 gwinAttachToggle(ghList1, 2, 3);//checked //8 gwinAttachToggle(ghList1, 3, 4);//checked //8 } //============================================= ginput_lld_toggle_Pal.c //============================================= void ginput_lld_toggle_init(const GToggleConfig *ptc) { //palSetGroupMode(((IOBus *)ptc->id)->portid, ptc->mask, 0, ptc->mode); } //This is just for testing mode //I have generate button pressing unsigned ginput_lld_toggle_getbits(const GToggleConfig *ptc) { volatile unsigned int res = 0; if (g_test_button_event_counter++ > 40) { g_test_button_event_counter = 0; } switch (g_test_button_event_counter) { case 10: res = 8; //(1 << 3) - bit in the port break; case 20: res = 4; //(1 << 2) - bit break; case 40: case 50: res = 2; break; default: res = 0; } return res; } //============================================ //it is my new component, it is just copy from list.c //list_checkbox.c //I add role number 3 //============================================ // a toggle-on has occurred static void ListCheckboxToggleOn(GWidgetObject *gw, gU16 role) { const gfxQueueASyncItem *qi; const gfxQueueASyncItem *qix; int i; gCoord iheight; gCoord iwidth; iheight = gdispGetFontMetric(gw->g.font, gFontHeight) + LST_CHECKBOX_VERT_PAD; switch (role) { // select down case 0: for (i = 0, qi = gfxQueueASyncPeek(&gw2obj->list_head); qi; qi = gfxQueueASyncNext(qi), i++) { if ((qi2li->flags & GLIST_FLG_SELECTED)) { qix = gfxQueueASyncNext(qi); if (qix) { qi2li->flags &= ~ GLIST_FLG_SELECTED; qix2li->flags |= GLIST_FLG_SELECTED; //if we need to scroll down if (((i + 2) * iheight - gw2obj->top) > gw->g.height) { gw2obj->top += iheight; } _gwinUpdate(&gw->g); } break; } } break; // select up case 1: qi = gfxQueueASyncPeek(&gw2obj->list_head); qix = 0; for (i = 0; qi; qix = qi, qi = gfxQueueASyncNext(qi), i++) { if ((qi2li->flags & GLIST_FLG_SELECTED)) { if (qix) { qi2li->flags &= ~ GLIST_FLG_SELECTED; qix2li->flags |= GLIST_FLG_SELECTED; if (((i - 1) * iheight) < gw2obj->top) { gw2obj->top -= iheight; if (gw2obj->top < 0) gw2obj->top = 0; } _gwinUpdate(&gw->g); } break; } } break; case 2://This one qi = gfxQueueASyncPeek(&gw2obj->list_head); qix = 0; for (i = 0; qi; qix = qi, qi = gfxQueueASyncNext(qi), i++) { if ((qi2li->flags & GLIST_FLG_SELECTED)) { qi2li->flags ^= GLIST_FLG_CHECKED; if (qi2li->keyActions.Enter.keyFunct) { qi2li->keyActions.Enter.keyFunct(1, gTrue); } _gwinUpdate(&gw->g); break; } } break; } } static void ListCheckboxToggleAssign(GWidgetObject *gw, gU16 role, gU16 instance) { if (role == 1) gw2obj->t_up = instance; else if (role == 0) gw2obj->t_dn = instance; else if (role == 2) gw2obj->t_check = instance;//This one } static gU16 ListCheckboxToggleGet(GWidgetObject *gw, gU16 role) { if (role == 1) return gw2obj->t_up; else if (role == 0) return gw2obj->t_dn; else if (role == 2) return gw2obj->t_check;//This one }
  8. Hi, comunity, A New font creation utility gives not smooth line, espacially with 1 pixel line width... How to convert font and take nice smooth font... OK, if this not possible, how to arrange it by hand?
  9. So, I try to use gwinDestroy(ghContainer) and seems to me it works! In this function deletes all child items, that belong to this container. But font settings losts too, so I make definition before the every container creation! Solved!
  10. I mean - one screan for TCP/IP settings, another screan - for user administration. May be I have to use containers, but does all widjets, wich was created befor, stay in the memory even one container is visible and another not? thanks advance
×
×
  • Create New...