Beispiel #1
0
/**
 * A row or columns at the given index had been added or removed
 */
void 
nsGrid::RowAddedOrRemoved(nsBoxLayoutState& aState, PRInt32 aIndex, bool aIsHorizontal)
{
  // TBD see if we have extra room in the table and just add the new row in
  // for now rebuild the world
  if (mMarkingDirty)
    return;

  NeedsRebuild(aState);
}
Beispiel #2
0
/*
 * A cell in the given row or columns at the given index has had a child added or removed
 */
void 
nsGrid::CellAddedOrRemoved(nsBoxLayoutState& aState, PRInt32 aIndex, bool aIsHorizontal)
{
  // TBD see if the cell will fit in our current row. If it will
  // just add it in. 
  // but for now rebuild everything.
  if (mMarkingDirty)
    return;

  NeedsRebuild(aState);
}
Beispiel #3
0
void ActualLibrarianEmscripten::Create ()
{
   if (librarian.Files().empty()) return;
   if (librarian.Output().empty()) throw std::runtime_error("Mising 'Output'");

   if (!NeedsRebuild()) return;

   std::cout << "\nCreating Lib (" << ToolChain::ToolChain() << ")" << std::endl;

   librarian.DoBeforeLink();

   if (boost::filesystem::exists(librarian.Output())) boost::filesystem::remove(librarian.Output());

   boost::filesystem::create_directories(boost::filesystem::path(librarian.Output()).remove_filename());

   std::string command = "emcc -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 --memory-init-file 0 ";

   command += "-o \"" + librarian.Output() + "\" ";

   for (auto&& f : librarian.Files()) command += "\"" + f + "\" ";

   int rc = std::system(command.c_str());
   if (rc != 0) throw std::runtime_error("Error creating lib");
}
Beispiel #4
0
void ActualLibrarianVisualStudio::Create ()
{
   if (librarian.Files().empty()) return;
   if (librarian.Output().empty()) throw std::runtime_error("Mising 'Output'");

   if (!NeedsRebuild()) return;

   std::cout << "\nCreating Lib (" << ToolChain::ToolChain() << " " << ToolChain::Platform() << ")" << std::endl;

   librarian.DoBeforeLink();

   if (boost::filesystem::exists(librarian.Output())) boost::filesystem::remove(librarian.Output());

   boost::filesystem::create_directories(boost::filesystem::path(librarian.Output()).remove_filename());

   std::string command = "Lib -NOLOGO ";
   command += "-OUT:\"" + librarian.Output() + "\" ";
   
   for (auto&& f : librarian.Files()) command += "\"" + f + "\" ";

   std::string cmd = ToolChain::SetEnvBatchCall() + " & " + command;
   int rc = std::system(cmd.c_str());
   if (rc != 0) throw std::runtime_error("Error creating lib");
}