⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 includewinc.c

📁 linux下的E_MAIL客户端源码
💻 C
📖 第 1 页 / 共 4 页
字号:
   This->BusyCursor(True);   This->CallOkCallbacks();//// See if there is another file to be displayed//   if ( This->fileIndex+1 < This->fileList.size() )      This->SetFile(This->fileIndex+1);   else      This->Hide();   This->BusyCursor(False);} // End DoOk/*--------------------------------------------------------------- *  Callback to handle press of skip button */voidIncludeWinC::DoSkip(Widget, IncludeWinC *This, XtPointer){   This->BusyCursor(True);//// See if there is another file to be displayed//   if ( This->fileIndex+1 < This->fileList.size() )      This->SetFile(This->fileIndex+1);   else      This->Hide();   This->BusyCursor(False);}/*--------------------------------------------------------------- *  Callback to handle press of charset button */voidIncludeWinC::DoCharset(Widget w, IncludeWinC *This, XtPointer){   char	*cs = "us-ascii";        if ( w == This->charIso1PB ) cs = "iso-8859-1";   else if ( w == This->charIso2PB ) cs = "iso-8859-2";   else if ( w == This->charIso3PB ) cs = "iso-8859-3";   else if ( w == This->charIso4PB ) cs = "iso-8859-4";   else if ( w == This->charIso5PB ) cs = "iso-8859-5";   else if ( w == This->charIso6PB ) cs = "iso-8859-6";   else if ( w == This->charIso7PB ) cs = "iso-8859-7";   else if ( w == This->charIso8PB ) cs = "iso-8859-8";   else if ( w == This->charIso9PB ) cs = "iso-8859-9";   else if ( w == This->charIso13PB ) cs = "iso-8859-13";   XmTextFieldSetString(This->charTF, cs);} // End DoCharset/*----------------------------------------------------------------------- *  Handle change of file type */voidIncludeWinC::FileTypeChanged(Widget w, IncludeWinC *This, XtPointer){   XtUnmanageChild(This->typePD);   int	newIndex = This->typePbList.indexOf(w);   if ( newIndex < 0 || newIndex == This->typeIndex ) return;   This->typeIndex = newIndex;   This->typeStr   = *This->typeList[newIndex];   This->UpdateVisibleFields();}/*----------------------------------------------------------------------- *  Handle change of include type */voidIncludeWinC::IncludeTypeChanged(Widget, IncludeWinC *This, XtPointer){   This->UpdateVisibleFields();}/*--------------------------------------------------------------- *  Query methods */MimeAccessTypeIncludeWinC::AccessType() const{   if ( AttachLocal() ) return AT_LOCAL_FILE;   if ( AttachAnon()  ) return AT_ANON_FTP;   if ( AttachFtp()   ) return AT_FTP;   if ( AttachTftp()  ) return AT_TFTP;   if ( AttachMail()  ) return AT_MAIL_SERVER;   return AT_INLINE;}BooleanIncludeWinC::AlreadyEncoded() const{   return XmToggleButtonGetState(preEncodeTB);}BooleanIncludeWinC::AttachAnon() const{   return XmToggleButtonGetState(attachAnonTB);}BooleanIncludeWinC::AttachFtp() const{   return XmToggleButtonGetState(attachFtpTB);}BooleanIncludeWinC::AttachLocal() const{   return XmToggleButtonGetState(attachLocalTB);}BooleanIncludeWinC::AttachMail() const{   return XmToggleButtonGetState(attachMailTB);}BooleanIncludeWinC::AttachTftp() const{   return XmToggleButtonGetState(attachTftpTB);}MimeContentTypeIncludeWinC::ContentType() const{   return ::ContentType(typeStr);}MimeEncodingTypeIncludeWinC::EncodingType() const{   if ( NoEncoding() ) return ET_NONE;   if ( Is8Bit()     ) return ET_8BIT;   if ( IsQP()       ) return ET_QP;   if ( IsBase64()   ) return ET_BASE_64;   if ( IsUUencode() ) return ET_UUENCODE;   if ( IsBinHex()   ) return ET_BINHEX;   return ET_UNKNOWN;} // End EncodingTypeMimeGroupTypeIncludeWinC::GroupType() const{   return ::GroupType(typeStr);}BooleanIncludeWinC::NoEncoding() const{   return XmToggleButtonGetState(encodeNoneTB);}BooleanIncludeWinC::IncludeAsFile() const{   return XmToggleButtonGetState(includeAsFileTB);}BooleanIncludeWinC::IncludeAsText() const{   return XmToggleButtonGetState(includeAsTextTB);}BooleanIncludeWinC::Is8Bit() const{   return XmToggleButtonGetState(encode8bitTB);}BooleanIncludeWinC::IsAppOctet() const{   return (strcasecmp(typeStr, "application/octet-stream") == 0);}BooleanIncludeWinC::IsBase64() const{   return XmToggleButtonGetState(encode64TB);}BooleanIncludeWinC::IsBinHex() const{   return XmToggleButtonGetState(encodeBinHexTB);}BooleanIncludeWinC::IsQP() const{   return XmToggleButtonGetState(encodeQpTB);}BooleanIncludeWinC::IsReadWrite() const{   return XmToggleButtonGetState(permRwTB);}BooleanIncludeWinC::IsText() const{   return (strncasecmp(typeStr, "text/", 5) == 0);}BooleanIncludeWinC::IsTextEnriched() const{   return (strcasecmp(typeStr, "text/enriched") == 0);}BooleanIncludeWinC::IsTextPlain() const{   return (strcasecmp(typeStr, "text/plain") == 0);}BooleanIncludeWinC::IsTextRichtext() const{   return (strcasecmp(typeStr, "text/richtext") == 0);}BooleanIncludeWinC::IsUUencode() const{   return XmToggleButtonGetState(encodeUuTB);}voidIncludeWinC::GetAppType(StringC& type) const{   if ( IsAppOctet() && !IncludeAsText() ) {      char	*cs = XmTextFieldGetString(octTypeTF);      type = cs;      XtFree(cs);   }   else      type.Clear();}voidIncludeWinC::GetAppPadding(StringC& pad) const{   if ( IsAppOctet() && !IncludeAsText() ) {      char	*cs = XmTextFieldGetString(octPadTF);      pad = cs;      XtFree(cs);   }   else      pad.Clear();}voidIncludeWinC::GetCharset(StringC& charset) const{   if ( IsText() && !IncludeAsText() ) {      char	*cs = XmTextFieldGetString(charTF);      charset = cs;      XtFree(cs);   }   else      charset.Clear();}voidIncludeWinC::GetDescription(StringC& desc) const{   char	*cs = XmTextFieldGetString(descTF);   desc = cs;   XtFree(cs);}voidIncludeWinC::GetExpiration(StringC& exp) const{   if ( !IncludeAsText() && !IncludeAsFile() ) {      char	*cs = XmTextFieldGetString(expTF);      exp = cs;      XtFree(cs);   }   else      exp.Clear();}voidIncludeWinC::GetFileName(StringC& name) const{   char	*cs = XmTextFieldGetString(nameTF);   name = cs;   XtFree(cs);}voidIncludeWinC::GetFileType(StringC& type) const{   type = typeStr;}voidIncludeWinC::GetFtpDir(StringC& dir) const{   if ( AttachFtp() || AttachAnon() || AttachTftp() ) {      char	*cs = XmTextFieldGetString(dirTF);      dir = cs;      XtFree(cs);   }   else      dir.Clear();}voidIncludeWinC::GetFtpHost(StringC& host) const{   if ( AttachFtp() || AttachAnon() || AttachTftp() ) {      char	*cs = XmTextFieldGetString(hostTF);      host = cs;      XtFree(cs);   }   else      host.Clear();}voidIncludeWinC::GetFtpMode(StringC& mode) const{   if ( AttachFtp() || AttachAnon() ) {      if      ( XmToggleButtonGetState(ftpModeAsciiTB)  ) mode = "ascii";      else if ( XmToggleButtonGetState(ftpModeEbcdicTB) ) mode = "ebcdic";      else if ( XmToggleButtonGetState(ftpModeImageTB)  ) mode = "image";//      else if ( XmToggleButtonGetState(ftpModeLocalTB)  ) mode = "local 8";   }   else      mode = "ascii";}voidIncludeWinC::GetMailAddr(StringC& addr) const{   if ( AttachMail() ) {      char	*cs = XmTextFieldGetString(serverTF);      addr = cs;      XtFree(cs);   }   else      addr.Clear();}voidIncludeWinC::GetMailBody(StringC& body) const{   if ( AttachMail() ) {      char	*cs = XmTextGetString(bodyText);      body = cs;      XtFree(cs);   }   else      body.Clear();}voidIncludeWinC::GetMailSubject(StringC& subject) const{   if ( AttachMail() ) {      char	*cs = XmTextFieldGetString(subjectTF);      subject = cs;      XtFree(cs);   }   else      subject.Clear();}voidIncludeWinC::GetOtherParams(StringC& params) const{   if ( !IncludeAsText() ) {      char	*cs = XmTextGetString(otherText);      params = cs;      XtFree(cs);//// Replace any newlines//      int	pos;      cs = params;      while ( (pos=params.PosOf(";\n")) > 0 ) cs[pos+1] = ' ';      while ( (pos=params.PosOf('\n'))  > 0 ) params(pos,1) = "; ";   }   else      params.Clear();}voidIncludeWinC::GetOutputName(StringC& name) const{   if ( !IncludeAsText() ) {      char	*cs = XmTextFieldGetString(outNameTF);      name = cs;      XtFree(cs);   }   else      name.Clear();}voidIncludeWinC::GetSize(StringC& size) const{   if ( !IncludeAsText() && !IncludeAsFile() ) {      char	*cs = XmTextFieldGetString(sizeTF);      size = cs;      XtFree(cs);   }   else      size.Clear();}voidIncludeWinC::GetTftpMode(StringC& mode) const{   if ( AttachTftp() ) {      if      ( XmToggleButtonGetState(tftpModeNetAsciiTB) ) mode = "netascii";      else if ( XmToggleButtonGetState(tftpModeOctetTB)    ) mode = "octet";      else if ( XmToggleButtonGetState(tftpModeMailTB)     ) mode = "mail";   }   else      mode = "netascii";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -