当前位置: 首页>>代码示例>>C++>>正文


C++ TRANS函数代码示例

本文整理汇总了C++中TRANS函数的典型用法代码示例。如果您正苦于以下问题:C++ TRANS函数的具体用法?C++ TRANS怎么用?C++ TRANS使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TRANS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DocumentWindow

MainWindow::MainWindow () 
  : DocumentWindow (TRANS("DSP Filters"),
                    Colours::lightgrey, 
                    DocumentWindow::allButtons,
                    true)
{
  setResizable (true, false);
  
  MainPanel* contentComponent = new MainPanel;
  setMenuBar (contentComponent);
  setContentOwned (contentComponent, true);
  contentComponent->setAsConstrainerFor (this);
  ContentComponentConstrainer::attachTo (this);

  centreWithSize (getWidth(), getHeight());
  setVisible (true);
}
开发者ID:COx2,项目名称:DSPFilters,代码行数:17,代码来源:MainWindow.cpp

示例2: StartModsLoadMenu

void StartModsLoadMenu(void)
{
  CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;

  gmCurrent.gm_mgTitle.mg_strText = TRANS("CHOOSE MOD");
  gmCurrent.gm_bAllowThumbnails = TRUE;
  gmCurrent.gm_iSortType = LSSORT_NAMEUP;
  gmCurrent.gm_bSave = FALSE;
  gmCurrent.gm_bManage = FALSE;
  gmCurrent.gm_fnmDirectory = CTString("Mods\\");
  gmCurrent.gm_fnmSelected = CTString("");
  gmCurrent.gm_fnmExt = CTString(".des");
  gmCurrent.gm_pAfterFileChosen = &LSLoadMod;

  gmCurrent.gm_pgmParentMenu = &_pGUIM->gmMainMenu;
  ChangeToMenu(&gmCurrent);
}
开发者ID:Bryceless,项目名称:Serious-Engine,代码行数:17,代码来源:MenuStarters.cpp

示例3: ASSERT

// save TGA routine
void CImageInfo::SaveTGA_t( const CTFileName &strFileName) const // throw char *
{
  TGAHeader *pTGAHdr;
  UBYTE *pTGABuffer, *pTGAImage;
  SLONG slFileSize;
  PIX pixBitmapSize = ii_Width*ii_Height;
  CTFileStream TGAFile;

  // determine and check image info format
  SLONG slBytesPerPixel = ii_BitsPerPixel/8;
  ASSERT( slBytesPerPixel==3 || slBytesPerPixel==4);
  if( slBytesPerPixel!=3 && slBytesPerPixel!=4) throw( TRANS( "Unsupported BitsPerPixel in ImageInfo header."));

  // determine TGA file size and allocate memory
  slFileSize = sizeof(struct TGAHeader) + pixBitmapSize *slBytesPerPixel;
  pTGABuffer = (UBYTE*)AllocMemory( slFileSize);
  pTGAHdr    = (struct TGAHeader*)pTGABuffer;
  pTGAImage  = pTGABuffer + sizeof(struct TGAHeader);

  // set TGA picture size dimensions
  memset( pTGABuffer, 0x0, sizeof(struct TGAHeader));
  pTGAHdr->Width        = (UWORD)ii_Width;
  pTGAHdr->Height       = (UWORD)ii_Height;
  pTGAHdr->BitsPerPixel = (UBYTE)ii_BitsPerPixel;
  pTGAHdr->ImageType    = 2;

  // flip image vertically
  BOOL bAlphaChannel = (slBytesPerPixel==4);
  FlipBitmap( ii_Picture, pTGAImage, ii_Width, ii_Height, 1, bAlphaChannel);

  // convert CroTeam's pixel format to TGA format
  UBYTE *pubTmp = pTGAImage;  // need 'walking' pointer
  for( INDEX iPix=0; iPix<pixBitmapSize; iPix++)
  { // flip bytes
    Swap( pubTmp[0], pubTmp[2]);  // R & B channels
    pubTmp += slBytesPerPixel; 
  }

  // save entire TGA memory to file and close it
  TGAFile.Create_t( strFileName);
  TGAFile.Write_t( pTGABuffer, slFileSize);
  TGAFile.Close();

  // free temorary allocated memory for TGA image format
  FreeMemory( pTGABuffer);
}
开发者ID:0-T-0,项目名称:Serious-Engine,代码行数:47,代码来源:ImageInfo.cpp

示例4: slComm

/*
 *  Initialize client
 */
void CCommunicationInterface::Client_Init_t(char* strServerName)
{
  CTSingleLock slComm(&cm_csComm, TRUE);

  ASSERT(cci_bInitialized);
  ASSERT(!cci_bClientInitialized);

  // retrieve server address from server name
  ULONG ulServerAddress = StringToAddress(strServerName);
  // if lookup failed
  if (ulServerAddress==INADDR_NONE) {
    ThrowF_t(TRANS("Host '%s' not found!\n"), strServerName);
  }

  // call client init with server address
  Client_Init_t(ulServerAddress);
};
开发者ID:bsmr-games,项目名称:Serious-Engine,代码行数:20,代码来源:CommunicationInterface.cpp

示例5: VideoConfirm

void VideoConfirm(void)
{
  CConfirmMenu &gmCurrent = _pGUIM->gmConfirmMenu;

  // FIXUP: keyboard focus lost when going from full screen to window mode
  // due to WM_MOUSEMOVE being sent
  _bMouseUsedLast = FALSE;
  _pmgUnderCursor = gmCurrent.gm_pmgSelectedByDefault;

  gmCurrent._pConfimedYes = NULL;
  gmCurrent._pConfimedNo = RevertVideoSettings;

  gmCurrent.gm_mgConfirmLabel.mg_strText = TRANS("KEEP THIS SETTING?");
  gmCurrent.gm_pgmParentMenu = pgmCurrentMenu;
  gmCurrent.BeLarge();
  ChangeToMenu(&gmCurrent);
}
开发者ID:bsmr-games,项目名称:Serious-Engine,代码行数:17,代码来源:MenuActions.cpp

示例6: fc

void FilenameComponent::buttonClicked (Button*)
{
   #if JUCE_MODAL_LOOPS_PERMITTED
    FileChooser fc (TRANS("Choose a new file"),
                    getCurrentFile() == File::nonexistent ? defaultBrowseFile
                                                          : getCurrentFile(),
                    wildcard);

    if (isDir ? fc.browseForDirectory()
              : (isSaving ? fc.browseForFileToSave (false)
                          : fc.browseForFileToOpen()))
    {
        setCurrentFile (fc.getResult(), true);
    }
   #else
    jassertfalse; // needs rewriting to deal with non-modal environments
   #endif
}
开发者ID:sonic59,项目名称:JuceS1Text,代码行数:18,代码来源:juce_FilenameComponent.cpp

示例7: FloatFR_Init

/*
  Creates lookup tables for some arithmetic functions
*/
void FloatFR_Init(void)
{
  int i;

  FLC_sub_start("FloatFR_Init");

  MULT(1); STORE(1);
  logDualisTable[0] = -1.0f; /* actually, ld 0 is not defined */

  PTR_INIT(1); /* logDualisTable[] */
  LOOP(1);
  for (i=1; i<LOG_DUALIS_TABLE_SIZE; i++) {
    TRANS(1); MULT(1); /* xxx * (1 / 0.30103) */ STORE(1);
    logDualisTable[i] = (float) ( log((float)i)/log(2.0f) );
  }
  
  FLC_sub_end();
}
开发者ID:wonktnodi,项目名称:webrtc_port,代码行数:21,代码来源:transcendent.cpp

示例8: StartCustomLoadMenu

void StartCustomLoadMenu(void)
{
  CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;

  gmCurrent.gm_mgTitle.mg_strText = TRANS("ADVANCED OPTIONS");
  gmCurrent.gm_bAllowThumbnails = FALSE;
  gmCurrent.gm_iSortType = LSSORT_NAMEUP;
  gmCurrent.gm_bSave = FALSE;
  gmCurrent.gm_bManage = FALSE;
  gmCurrent.gm_fnmDirectory = CTString("Scripts\\CustomOptions\\");
  gmCurrent.gm_fnmSelected = CTString("");
  gmCurrent.gm_fnmExt = CTString(".cfg");
  gmCurrent.gm_pAfterFileChosen = &LSLoadCustom;
  gmCurrent.gm_mgNotes.mg_strText = "";

  gmCurrent.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
  ChangeToMenu(&gmCurrent);
}
开发者ID:Bryceless,项目名称:Serious-Engine,代码行数:18,代码来源:MenuStarters.cpp

示例9: StartControlsLoadMenu

void StartControlsLoadMenu(void)
{
  CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;

  gmCurrent.gm_mgTitle.mg_strText = TRANS("LOAD CONTROLS");
  gmCurrent.gm_bAllowThumbnails = FALSE;
  gmCurrent.gm_iSortType = LSSORT_FILEUP;
  gmCurrent.gm_bSave = FALSE;
  gmCurrent.gm_bManage = FALSE;
  gmCurrent.gm_fnmDirectory = CTString("Controls\\");
  gmCurrent.gm_fnmSelected = CTString("");
  gmCurrent.gm_fnmExt = CTString(".ctl");
  gmCurrent.gm_pAfterFileChosen = &LSLoadControls;
  gmCurrent.gm_mgNotes.mg_strText = "";

  gmCurrent.gm_pgmParentMenu = &_pGUIM->gmControls;
  ChangeToMenu(&gmCurrent);
}
开发者ID:Bryceless,项目名称:Serious-Engine,代码行数:18,代码来源:MenuStarters.cpp

示例10: StartPlayerModelLoadMenu

// -------- Save/Load Menu Calling Functions
void StartPlayerModelLoadMenu(void)
{
  CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;

  gmCurrent.gm_mgTitle.mg_strText = TRANS("CHOOSE MODEL");
  gmCurrent.gm_bAllowThumbnails = TRUE;
  gmCurrent.gm_iSortType = LSSORT_FILEUP;
  gmCurrent.gm_bSave = FALSE;
  gmCurrent.gm_bManage = FALSE;
  gmCurrent.gm_fnmDirectory = CTString("Models\\Player\\");
  gmCurrent.gm_fnmSelected = _strLastPlayerAppearance;
  gmCurrent.gm_fnmExt = CTString(".amc");
  gmCurrent.gm_pAfterFileChosen = &LSLoadPlayerModel;
  gmCurrent.gm_mgNotes.mg_strText = "";

  gmCurrent.gm_pgmParentMenu = &_pGUIM->gmPlayerProfile;
  ChangeToMenu(&gmCurrent);
}
开发者ID:Bryceless,项目名称:Serious-Engine,代码行数:19,代码来源:MenuStarters.cpp

示例11: TRANS

PopupMenu MenuBarItem::createPopupMenuWithItems (const StringArray& items)
{
    PopupMenu popupMenu;

    for (int i = 0; i < items.size(); ++i)
    {
        const int nextId = i + 1;

        const String& s = items.strings.getReference (i);

        if (s == "-")
            popupMenu.addSeparator();
        else
            popupMenu.addItem (nextId, TRANS (s));
    }

    return popupMenu;
}
开发者ID:jrlanglois,项目名称:jrl_acc,代码行数:18,代码来源:ACCMenuBarItems.cpp

示例12: FindPanel

	FindPanel()
		: caseButton ("Match Case"),
		findPrev ("<", "Search Previous"),
		findNext (">", "Search Next"),
		searchButton("", 0.0, Colours::white)
	{
		editor.setColour (CaretComponent::caretColourId, Colours::black);
		editor.addListener (this);
		addAndMakeVisible (editor);
		searchButton.addListener(this);
		addAndMakeVisible (searchButton);

		label.setText ("Find:", dontSendNotification);
		label.setColour (Label::textColourId, Colours::white);
		label.attachToComponent (&editor, true);

		searchInComboBox.setEditableText (false);
		searchInComboBox.setJustificationType (Justification::centredLeft);
		searchInComboBox.addItem (TRANS("Editor"), 1);
		searchInComboBox.addItem (TRANS("Output"), 2);
		searchInComboBox.addItem (TRANS("Methods"), 3);
		searchInComboBox.setSelectedItemIndex(0, dontSendNotification);
		searchInComboBox.addListener(this);
		searchInComboBox.setEnabled(false);
		addAndMakeVisible(searchInComboBox);

		addAndMakeVisible (caseButton);
		caseButton.setColour (ToggleButton::textColourId, Colours::white);
		caseButton.setToggleState (false, dontSendNotification);
		caseButton.addListener (this);

		lookInComboBox.setEditableText (false);
		lookInComboBox.setJustificationType (Justification::centredLeft);
		lookInComboBox.addItem (TRANS("Current"), 1);
		lookInComboBox.addItem (TRANS("All Open"), 2);
		lookInComboBox.addItem (TRANS("All"), 3);
		lookInComboBox.setSelectedItemIndex(0, dontSendNotification);
		lookInComboBox.addListener(this);
		addAndMakeVisible(lookInComboBox);

		findPrev.setConnectedEdges (Button::ConnectedOnRight);
		findPrev.addListener(this);
		findNext.setConnectedEdges (Button::ConnectedOnLeft);
		findNext.addListener(this);
		addAndMakeVisible (findPrev);
		addAndMakeVisible (findNext);

		setWantsKeyboardFocus (false);
		setFocusContainer (true);
		findPrev.setWantsKeyboardFocus (true);
		findNext.setWantsKeyboardFocus (true);
	}
开发者ID:grimtraveller,项目名称:ctrlr,代码行数:52,代码来源:CtrlrLuaMethodCodeEditor.cpp

示例13: op

/*
Compute the inverse-matrix matrix product B = \alpha op(inv(A))B for
Side is CblasLeft and B = \alpha B op(inv(A)) for Side is
CblasRight. The matrix A is triangular and op(A) = A, A^T, A^H for
TransA = CblasNoTrans, CblasTrans, CblasConjTrans. When Uplo is
CblasUpper then the upper triangle of A is used, and when Uplo is
CblasLower then the lower triangle of A is used. If Diag is
CblasNonUnit then the diagonal of A is used, but if Diag is CblasUnit
then the diagonal elements of the matrix A are taken as unity and are
not referenced.
*/
int fff_blas_dtrsm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, 
		    double alpha, const fff_matrix * A, fff_matrix * B)
{
  char* side = SWAP_SIDE(Side); 
  char* uplo = SWAP_UPLO(Uplo); 
  char* transa = TRANS(TransA); 
  char* diag = DIAG(Diag); 
  int m = B->size2; 
  int n = B->size1;
  int lda = (int) A->tda; 
  int ldb = (int) B->tda; 

  return( FNAME(dtrsm)(side, uplo, transa, diag, &m, &n, 
		       &alpha, 
		       A->data, &lda, 
		       B->data, &ldb) ); 
  
}
开发者ID:FNNDSC,项目名称:nipy,代码行数:29,代码来源:fff_blas.c

示例14: StartAddonsLoadMenu

void StartAddonsLoadMenu(void)
{
  CLoadSaveMenu &gmCurrent = _pGUIM->gmLoadSaveMenu;

  gmCurrent.gm_mgTitle.mg_strText = TRANS("EXECUTE ADDON");
  gmCurrent.gm_bAllowThumbnails = FALSE;
  gmCurrent.gm_iSortType = LSSORT_NAMEUP;
  gmCurrent.gm_bSave = FALSE;
  gmCurrent.gm_bManage = FALSE;
  gmCurrent.gm_fnmDirectory = CTString("Scripts\\Addons\\");
  gmCurrent.gm_fnmSelected = CTString("");
  gmCurrent.gm_fnmExt = CTString(".ini");
  gmCurrent.gm_pAfterFileChosen = &LSLoadAddon;
  gmCurrent.gm_mgNotes.mg_strText = "";

  gmCurrent.gm_pgmParentMenu = &_pGUIM->gmOptionsMenu;
  ChangeToMenu(&gmCurrent);
}
开发者ID:Bryceless,项目名称:Serious-Engine,代码行数:18,代码来源:MenuStarters.cpp

示例15: info

void AlertWindow::showMessageBoxAsync (AlertIconType iconType,
                                       const String& title,
                                       const String& message,
                                       const String& buttonText,
                                       Component* associatedComponent)
{
    if (LookAndFeel::getDefaultLookAndFeel().isUsingNativeAlertWindows())
    {
        return NativeMessageBox::showMessageBoxAsync (iconType, title, message, associatedComponent);
    }
    else
    {
        AlertWindowInfo info (title, message, associatedComponent, iconType, 1, 0, false);
        info.button1 = buttonText.isEmpty() ? TRANS("ok") : buttonText;

        info.invoke();
    }
}
开发者ID:Amcut,项目名称:pizmidi,代码行数:18,代码来源:juce_AlertWindow.cpp


注:本文中的TRANS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。