예제 #1
0
// User clicked up directory button
long FontSelector::onCmdSize(FXObject*, FXSelector, void* ptr)
{
    selected.size = (FXuint)(FXuval)sizelist->getItemData((int)(FXival)ptr);
    size->setText(sizelist->getItemText((int)(FXival)ptr));
    previewFont();
    return(1);
}
예제 #2
0
// User clicked up directory button
long FontSelector::onCmdStyle(FXObject*, FXSelector, void* ptr)
{
    selected.slant = (FXuint)(FXuval)stylelist->getItemData((int)(FXival)ptr);
    style->setText(stylelist->getItemText((int)(FXival)ptr));
    listFontSizes();
    previewFont();
    return(1);
}
예제 #3
0
// Changed weight setting
long FontSelector::onCmdWeight(FXObject*, FXSelector, void* ptr)
{
    selected.weight = (FXuint)(FXuval)weightlist->getItemData((int)(FXival)ptr);
    weight->setText(weightlist->getItemText((int)(FXival)ptr));
    listSlants();
    listFontSizes();
    previewFont();
    return(1);
}
예제 #4
0
// Selected font family
long FontSelector::onCmdFamily(FXObject*, FXSelector, void* ptr)
{
    strlcpy(selected.face, familylist->getItemText((int)(FXival)ptr).text(), sizeof(selected.face)+1);
    family->setText(selected.face);
    listWeights();
    listSlants();
    listFontSizes();
    previewFont();
    return(1);
}
예제 #5
0
// Changed set width
long FontSelector::onCmdSetWidth(FXObject*, FXSelector, void*)
{
    int index = setwidth->getCurrentItem();

    selected.setwidth = (FXuint)(FXuval)setwidth->getItemData(index);
    listFontFaces();
    listWeights();
    listSlants();
    listFontSizes();
    previewFont();
    return(1);
}
예제 #6
0
//auto fix errors.
void siteDialog::setUIFromParam() {
  ui_.nameEdit->setText(param_.name_);
  ui_.addrEdit->setText(param_.hostAddress_);
  ui_.protocolCombo->setCurrentIndex(param_.protocolType_);
  ui_.portCheck->setCheckState(param_.port_ == ports[ui_.protocolCombo->currentIndex()]?Qt::Unchecked:Qt::Checked);
  ui_.portEdit->setText(QString("%1").arg(param_.port_));
  ui_.hostTypeCombo->setCurrentIndex(param_.hostType_);
  ui_.proxyCheck->setCheckState(param_.proxyType_?Qt::Checked:Qt::Unchecked);
  ui_.autoLoginCheck->setCheckState(param_.isAutoLogin_?Qt::Checked:Qt::Unchecked);

  previewFont();
}
예제 #7
0
// Changed pitch
long FontSelector::onCmdPitch(FXObject*, FXSelector, void*)
{
    int index = pitch->getCurrentItem();

    selected.flags &= ~(FXFont::Fixed|FXFont::Variable);
    selected.flags |= (FXuint)(FXuval)pitch->getItemData(index);
    listFontFaces();
    listWeights();
    listSlants();
    listFontSizes();
    previewFont();
    return(1);
}
예제 #8
0
// Character set
long FontSelector::onCmdCharset(FXObject*, FXSelector, void*)
{
    int    index = charset->getCurrentItem();
    FXuint enc = (FXuint)(FXuval)charset->getItemData(index);

    selected.encoding = (FXFontEncoding)enc;
    listFontFaces();
    listWeights();
    listSlants();
    listFontSizes();
    previewFont();
    return(1);
}
예제 #9
0
// User clicked up directory button
long FontSelector::onCmdSizeText(FXObject*, FXSelector, void*)
{
    selected.size = (FXuint)(10.0*FXFloatVal(size->getText()));
    if (selected.size < 60)
    {
        selected.size = 60;
    }
    if (selected.size > 2400)
    {
        selected.size = 2400;
    }
    previewFont();
    return(1);
}
예제 #10
0
// All fonts toggle
long FontSelector::onCmdAllFonts(FXObject*, FXSelector, void* ptr)
{
    if (ptr)
    {
        selected.flags |= FXFont::X11;
    }
    else
    {
        selected.flags &= ~FXFont::X11;
    }
    listFontFaces();
    listWeights();
    listSlants();
    listFontSizes();
    previewFont();
    return(1);
}
예제 #11
0
// Change font selection
void FontSelector::setFontSelection(const FXFontDesc& fontdesc)
{
    selected = fontdesc;

    // Validate these numbers
    if (selected.encoding > FONTENCODING_UNICODE)
    {
        selected.encoding = FONTENCODING_UNICODE;
    }
    if (selected.slant > FXFont::ReverseOblique)
    {
        selected.slant = FXFont::ReverseOblique;
    }
    if (selected.weight > FXFont::Black)
    {
        selected.weight = FXFont::Black;
    }
    if (selected.setwidth > FXFont::UltraExpanded)
    {
        selected.setwidth = FXFont::UltraExpanded;
    }
    if (selected.size > 10000)
    {
        selected.size = 10000;
    }

    // Under Windows, this should be OFF
    selected.flags &= ~FXFont::X11;

    // Relist fonts
    listFontFaces();
    listWeights();
    listSlants();
    listFontSizes();

    // Update preview
    previewFont();
}
예제 #12
0
void ZFonts::slot_fontSelect(int n)
{
	previewFont(getFontPath(lbFonts->item(n)));
}