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


C++ Blackbox::screenNumber方法代码示例

本文整理汇总了C++中Blackbox::screenNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ Blackbox::screenNumber方法的具体用法?C++ Blackbox::screenNumber怎么用?C++ Blackbox::screenNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Blackbox的用法示例。


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

示例1: save

void BlackboxResource::save(Blackbox& blackbox) {
  bt::Resource res;

  {
    if (bt::Resource(rc_file).read("session.cacheLife",
                                   "Session.CacheLife",
                                   -1) == -1) {
      res.merge(rc_file);
    } else {
      // we are converting from 0.65.0 to 0.70.0, let's take the liberty
      // of generating a brand new rc file to make sure we throw out
      // undeeded entries
    }
  }

  res.write("session.menuFile", menuFilename());

  res.write("session.styleFile", styleFilename());

  res.write("session.maximumColors",  bt::Image::maximumColors());

  res.write("session.doubleClickInterval", double_click_interval);

  res.write("session.autoRaiseDelay", ((auto_raise_delay.tv_sec * 1000ul) +
                                       (auto_raise_delay.tv_usec / 1000ul)));

  std::string str;
  switch (bt::Image::ditherMode()) {
  case bt::OrderedDither:        str = "OrderedDither";        break;
  case bt::FloydSteinbergDither: str = "FloydSteinbergDither"; break;
  default:                       str = "NoDither";             break;
  }
  res.write("session.imageDither", str);

  // window options
  switch (focus_model) {
  case SloppyFocusModel:
  default:
    str = "SloppyFocus";
    if (auto_raise)
      str += " AutoRaise";
    if (click_raise)
      str += " ClickRaise";
    break;
  case ClickToFocusModel:
    str = "ClickToFocus";
    break;
  }
  res.write("session.focusModel", str);

  switch (window_placement_policy) {
  case CascadePlacement:
    str = "CascadePlacement";
    break;
  case CenterPlacement:
    str = "CenterPlacement";
    break;
  case ColSmartPlacement:
    str = "ColSmartPlacement";
    break;
  case RowSmartPlacement:
  default:
    str = "RowSmartPlacement";
    break;
  }
  res.write("session.windowPlacement", str);
  res.write("session.rowPlacementDirection",
            (row_direction == LeftRight)
            ? "LeftToRight"
            : "RightToLeft");
  res.write("session.colPlacementDirection",
            (col_direction == TopBottom)
            ? "TopToBottom"
            : "BottomToTop");

  res.write("session.placementIgnoresShaded", ignore_shaded);

  res.write("session.opaqueMove", opaque_move);
  res.write("session.opaqueResize", opaque_resize);
  res.write("session.fullMaximization", full_max);
  res.write("session.focusNewWindows", focus_new_windows);
  res.write("session.focusLastWindow", focus_last_window_on_workspace);
  res.write("session.changeWorkspaceWithMouseWheel",
            change_workspace_with_mouse_wheel);
  res.write("session.shadeWindowWithMouseWheel",
            shade_window_with_mouse_wheel);
  res.write("session.toolbarActionsWithMouseWheel",
            toolbar_actions_with_mouse_wheel);
  res.write("session.disableBindingsWithScrollLock", allow_scroll_lock);
  res.write("session.edgeSnapThreshold", edge_snap_threshold);
  res.write("session.windowSnapThreshold", window_snap_threshold);

  for (unsigned int i = 0; i < blackbox.screenCount(); ++i)
    screen_resources[i].save(res, blackbox.screenNumber(i));

  res.save(rc_file);
}
开发者ID:burzumishi,项目名称:blackbox,代码行数:97,代码来源:BlackboxResource.cpp


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