MCPcopy Create free account
hub / github.com/buggins/coolreader / nextLayout

Method nextLayout

crengine/src/crgui.cpp:1929–1959  ·  view source on GitHub ↗

get next layout

Source from the content-addressed store, hash-verified

1927
1928// get next layout
1929CRKeyboardLayoutRef CRKeyboardLayoutList::nextLayout()
1930{
1931 bool found = false;
1932 CRKeyboardLayoutRef prev;
1933 CRKeyboardLayoutRef next;
1934 CRKeyboardLayoutRef first;
1935 CRKeyboardLayoutRef last;
1936 LVHashTable<lString16, CRKeyboardLayoutRef>::iterator i( _table );
1937 for ( ;; ) {
1938 LVHashTable<lString16, CRKeyboardLayoutRef>::pair * item = i.next();
1939 if ( !item )
1940 break;
1941 if ( first.isNull() )
1942 first = item->value;
1943 last = item->value;
1944 if ( item->value.get() == _current.get() ) {
1945 found = true;
1946 } else {
1947 if ( !found )
1948 prev = item->value;
1949 else if ( next.isNull() )
1950 next = item->value;
1951
1952 }
1953 }
1954 if ( next.isNull() )
1955 _current = first;
1956 else
1957 _current = next;
1958 return _current;
1959}
1960
1961bool CRKeyboardLayoutList::openFromFile( const char * layoutFile )
1962{

Callers 2

onCommandMethod · 0.80
onCommandMethod · 0.80

Calls 3

nextMethod · 0.80
isNullMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected