MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / DlgFile

Function DlgFile

wdialog.cpp:786–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784// File / File Settings menu command.
785
786flag API DlgFile(HWND hdlg, uint message, WORD wParam, LONG lParam)
787{
788 char sz[cchSzMax];
789 int i, nwx;
790 real rI;
791
792 switch (message) {
793 case WM_INITDIALOG:
794 SetCheck(dxFi_YOO, us.fSmartSave);
795 SetCheck(dxFi_kh, us.fTextHTML);
796 SetCheck(dxFi_Wb, wi.fBmpWindow);
797 SetCheck(dxFi_Xbp, gs.chBmpMode == 'P');
798 SetCheck(dxFi_Xp0, !gs.fPSComplete);
799 SetCheck(dxFi_Wt, wi.fNoPopup);
800 SetCheck(dxFi_Yo, us.fWriteOld);
801 SetCheck(dxFi_YXf, gs.nFontAll > 0);
802 SetEditN(deFi_Wx, wi.nAntialias);
803 SetEditN(deFi_YXx, gs.nThickAdjust);
804 SetCheck(dxFi_XI0, !gs.fBackDraw);
805 for (i = 25; i <= 100; i += 25) {
806 sprintf(sz, "%d", i);
807 SetCombo(dcFi_XI1, sz);
808 }
809 SetEditR(hdlg, dcFi_XI1, gs.rBackPct, -3);
810 SetEdit(deFi_Y5i, us.szADB);
811 SetEdit(deFi_YXp0_x, SzLength(gs.xInch));
812 SetEdit(deFi_YXp0_y, SzLength(gs.yInch));
813 SetRadio(gs.nOrient == 0 ? dr03 : (gs.nOrient > 0 ? dr01 : dr02),
814 dr01, dr03);
815 return fFalse;
816
817 case WM_COMMAND:
818 if (wParam == IDOK) {
819 nwx = GetEditN(hdlg, deFi_Wx);
820 rI = GetEditR(hdlg, dcFi_XI1);
821 EnsureN(nwx, FValidAntialias(nwx), "antialias");
822 EnsureR(rI, FValidBackPct(rI), "background transparency");
823 us.fSmartSave = GetCheck(dxFi_YOO);
824 us.fTextHTML = GetCheck(dxFi_kh);
825 wi.fBmpWindow = GetCheck(dxFi_Wb);
826 if (GetCheck(dxFi_Xbp))
827 gs.chBmpMode = 'P';
828 else if (gs.chBmpMode == 'P')
829 gs.chBmpMode = 'B';
830 gs.fPSComplete = !GetCheck(dxFi_Xp0);
831 wi.fNoPopup = GetCheck(dxFi_Wt);
832 us.fWriteOld = GetCheck(dxFi_Yo);
833 gs.nFontAll = GetCheck(dxFi_YXf) * gi.nFontPrev;
834 gs.nFontTxt = gs.nFontAll / 0x100000;
835 gs.nFontSig = (gs.nFontAll / 0x10000) % 0x10;
836 gs.nFontHou = (gs.nFontAll / 0x1000) % 0x10;
837 gs.nFontObj = (gs.nFontAll / 0x100) % 0x10;
838 gs.nFontAsp = (gs.nFontAll / 0x10) % 0x10;
839 gs.nFontNak = gs.nFontAll % 0x10;
840 if (nwx <= 0)
841 gs.fAntialias = fFalse;
842 else
843 wi.nAntialias = nwx;

Callers

nothing calls this directly

Calls 5

SetEditRFunction · 0.85
SzLengthFunction · 0.85
GetEditNFunction · 0.85
GetEditRFunction · 0.85
RParseSzFunction · 0.85

Tested by

no test coverage detected