Example #1
0
// Change patterns, each pattern separated by newline
void FileSelector::setPatternList(const FXString& patterns)
{
    FXString pat;
    FXint i;
    filefilter->clearItems();
    for(i=0; !(pat=patterns.section('\n',i)).empty(); i++)
        filefilter->appendItem(pat);
    if(!filefilter->getNumItems())
        filefilter->appendItem(allfiles);
    setCurrentPattern(0);
}
Example #2
0
// Set bunch of patterns
void FileSelector::setPatternList(const FXchar **ptrns)
{
    filefilter->clearItems();
    if(ptrns)
    {
        while(ptrns[0] && ptrns[1])
        {
            filefilter->appendItem(FXStringFormat("%s (%s)",ptrns[0],ptrns[1]));
            ptrns+=2;
        }
    }
    if(!filefilter->getNumItems())
        filefilter->appendItem(allfiles);
    setCurrentPattern(0);
}
Example #3
0
// constructor...
Pattern::Pattern()
{

  // Only init internal data -
  // adding dependencies on other items at this point is tricky, if we aren't really careful
  // about order of construction.

  for (uint32_t i = 0; i < PATTERN_LEN; i++)
  {
    for (uint32_t j = 0; j < NUM_PATTERNS; j++)
    {
      pattern_data[j][i] = sequence[i];
    }
  }

  setCurrentVoice(0);
  setCurrentPattern(0);

  current_voice_mask  = 0x01;
  current_accent_mask = 0x010000;

}