virtual bool get_description(t_uint32 p_index,pfc::string_base & p_out)
   {
      switch ( p_index )
      {
      case CMD_NOTITLE:
         p_out.set_string( "Hide the main window title bar" );
         return true;

      case CMD_SAVE_1:
      case CMD_SAVE_2:
      case CMD_SAVE_3:
      case CMD_SAVE_4:
      case CMD_SAVE_5:
         {
            p_out.set_string( "save current screen location to a slot" );
            return true;
         }
         break;
      case CMD_REST_1:
      case CMD_REST_2:
      case CMD_REST_3:
      case CMD_REST_4:
      case CMD_REST_5:
         {
            p_out.set_string( "restore screen location from a slot" );
            return true;
         }
         break;
      case CMD_SCRIPT1:
      case CMD_SCRIPT2:
         p_out.set_string( "Change the layout and size" );
         return true;
      }
      return false;
   }
Esempio n. 2
0
void playlist_view_cache::get_display_name(unsigned playlist, unsigned idx, int col, pfc::string_base & out)
{	
	playlist_cache * p_cache = get_item(playlist);
	if (idx >= 0 && idx < p_cache->get_count())
	{
		if (!p_cache->get_item(idx))
		{
			if (!update_item(playlist, idx)) {out.set_string("Error"); return;}
		}
		p_cache->get_item(idx)->get_item(col)->get_display(out); return;
	}
	out.set_string("Internal error - invalid playlist entry!");
}
	void remove_chars( const char* p_src , pfc::string_base& p_out , const char* p_char)
	{
		const char* p  = p_char;
		pfc::string8 temp(p_src);
		const char* p2 = temp.get_ptr();
		for (;*p;)
		{
			unsigned test;
			t_size delta = pfc::utf8_decode_char(p,test);
			if(delta == 0 || test == 0)break;
			for (;*p2;)
			{
				unsigned test2;
				t_size delta2 = pfc::utf8_decode_char(p2,test2);
				if(delta2 == 0 || test2 == 0)break;
				if( test == test2 ){
					temp.remove_chars(p2-temp.get_ptr(),delta2);
				}
				else{
					p2 += delta2;
				}
			}
			p2 = temp.get_ptr();
			p += delta;
		}
		p_out.set_string(temp);
	}
Esempio n. 4
0
void wsh_panel_vars::get_default_script_code(pfc::string_base & out)
{
	out.reset();
	puResource pures = uLoadResource(core_api::get_my_instance(), uMAKEINTRESOURCE(IDR_SCRIPT), "SCRIPT");

	if (pures)
		out.set_string(reinterpret_cast<const char *>(pures->GetPointer()), pures->GetSize());
}
void CDialogPref::uGetItemText(int nItem, int nSubItem, pfc::string_base & out)
{
    enum { BUFFER_LEN = 1024 };
    TCHAR buffer[BUFFER_LEN];

    m_props.GetItemText(nItem, nSubItem, buffer, BUFFER_LEN);
    out.set_string(pfc::stringcvt::string_utf8_from_os(buffer));
}
Esempio n. 6
0
bool archive_impl::g_parse_unpack_path_ex(const char * path,pfc::string_base & archive,pfc::string_base & file, pfc::string_base & type) {
	PFC_ASSERT( g_is_unpack_path(path) );
	const char * base = path + unpack_prefix_len; // strstr(path, "//");
	const char * split = strchr(path,'|');
	if (base == NULL || split == NULL || base > split) return false;
	// base += 2;
	type.set_string( base, split - base );
	int delta = path_unpack_string(archive,split);
	if (delta<0) return false;
	split += delta;
	file = split;
	return true;
}
   virtual void get_name(t_uint32 p_index,pfc::string_base & p_out)
   {
      switch ( p_index )
      {
      case CMD_NOTITLE:
         p_out.set_string( "Hide Title Bar" );
         break;

      case CMD_SAVE_1:
      case CMD_SAVE_2:
      case CMD_SAVE_3:
      case CMD_SAVE_4:
      case CMD_SAVE_5:
         {
            int n = p_index - CMD_SAVE_1;
            p_out.set_string( pfc::string_printf( "save %s", 
               names[n]->get_ptr() ) );
         }
         break;
      case CMD_REST_1:
      case CMD_REST_2:
      case CMD_REST_3:
      case CMD_REST_4:
      case CMD_REST_5:
         {
            int n = p_index - CMD_REST_1;
            p_out.set_string( pfc::string_printf( "restore %s", 
               names[n]->get_ptr() ) );
         }
         break;
      case CMD_SCRIPT1:
         p_out.set_string( "->Big View" );
         break;
      case CMD_SCRIPT2:
         p_out.set_string( "->Small View" );
         break;
      }
   }
Esempio n. 8
0
bool archive_impl::relative_path_create(const char * file_path,const char * playlist_path,pfc::string_base & out) {
	pfc::string8 archive,file;
	if (g_parse_unpack_path(file_path,archive,file))
	{
		pfc::string8 archive_rel;
		if (g_relative_path_create(archive,playlist_path,archive_rel))
		{
			pfc::string8 out_path;
			make_unpack_path(out_path,archive_rel,file);
			out.set_string(out_path);
			return true;
		}
	}
	return false;
}
Esempio n. 9
0
bool archive_impl::relative_path_parse(const char * relative_path,const char * playlist_path,pfc::string_base & out)
{
	if (!is_our_path(relative_path)) return false;
	pfc::string8 archive_rel,file;
	if (g_parse_unpack_path(relative_path,archive_rel,file))
	{
		pfc::string8 archive;
		if (g_relative_path_parse(archive_rel,playlist_path,archive))
		{
			pfc::string8 out_path;
			make_unpack_path(out_path,archive,file);
			out.set_string(out_path);
			return true;
		}
	}
	return false;
}
Esempio n. 10
0
static int path_unpack_string(pfc::string_base & out,const char * src)
{
	int ptr=0;
	if (src[ptr++]!='|') return -1;
	int len = atoi(src+ptr);
	if (len<=0) return -1;
	while(src[ptr]!=0 && src[ptr]!='|') ptr++;
	if (src[ptr]!='|') return -1;
	ptr++;
	int start = ptr;
	while(ptr-start<len)
	{
		if (src[ptr]==0) return -1;
		ptr++;
	}
	if (src[ptr]!='|') return -1;
	out.set_string(&src[start],len);
	ptr++;	
	return ptr;
}
Esempio n. 11
0
void stream_reader::read_string_ex(pfc::string_base & p_out,t_size p_bytes,abort_callback & p_abort) {
	const t_size expBase = 64*1024;
	if (p_bytes > expBase) {
		pfc::array_t<char> temp;
		t_size allocWalk = expBase;
		t_size done = 0;
		for(;;) {
			const t_size target = pfc::min_t(allocWalk, p_bytes);
			temp.set_size(target);
			read_object(temp.get_ptr() + done, target - done, p_abort);
			if (target == p_bytes) break;
			done = target;
			allocWalk <<= 1;
		}
		p_out.set_string(temp.get_ptr(), p_bytes);
	} else {
		pfc::string_buffer buf(p_out, p_bytes);
		read_object(buf.get_ptr(),p_bytes,p_abort);
	}
}
Esempio n. 12
0
void menu_extension::get_name(pfc::string_base & out)const
{
	out.set_string("Menu");
}
void example_window::get_name(pfc::string_base & out)const
{
	out.set_string("Example");
}
void example_window::get_category(pfc::string_base & out)const
{
	out.set_string("Panels");
}
Esempio n. 15
0
void spectrum_extension::get_name(pfc::string_base & out)const
{
	out.set_string("Spectrum analyser");
}
Esempio n. 16
0
void seek_bar_extension::get_name(pfc::string_base & out)const
{
	out.set_string("Seekbar");
}
 void get_item_default_path( unsigned n, pfc::string_base & out )
 {
    out.set_string( g_mm_paths[n] );           
 }
 void get_item_name( unsigned n, pfc::string_base & out )
 {
    out.set_string( g_mm_names[n] );
 }
Esempio n. 19
0
void playlist_view::get_category(pfc::string_base & out)const
{
	out.set_string("Playlist views");
}
Esempio n. 20
0
void window_visualisation::get_category(pfc::string_base & out)const
{
	out.set_string("Visualisations");
}
Esempio n. 21
0
bool playlist_view::get_short_name(pfc::string_base & out)const
{
	out.set_string("Playlist");
	return true;
}
Esempio n. 22
0
void playlist_view::get_name(pfc::string_base & out)const
{
	out.set_string("Columns Playlist");
}
Esempio n. 23
0
void UIElement::get_name(pfc::string_base & out)
{
	out.set_string("Alsong Lyric Element");
}
Esempio n. 24
0
void menu_extension::get_category(pfc::string_base & out)const
{
	out.set_string("Toolbars");
}
Esempio n. 25
0
void console_window::get_name(pfc::string_base & out)const
{
	out.set_string("Console");
}
	virtual void get_name(pfc::string_base& p_out) { p_out.set_string("Resampler (CXN4689)"); }
 virtual void get_display_string(pfc::string_base & p_out) { p_out.set_string( m_name ); }